From 1255fc9a34609803e11eadbd37d3bea5cac931ca Mon Sep 17 00:00:00 2001 From: "Christopher K. Hoadley" Date: Mon, 7 Dec 2020 18:26:44 -0600 Subject: [PATCH 1/2] Save csv file to output directory (if specified). --- sherlock/sherlock.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index cd779322..73b8f8b6 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -637,7 +637,14 @@ def main(): file.write(f"Total Websites Username Detected On : {exists_counter}\n") if args.csv: - with open(username + ".csv", "w", newline='', encoding="utf-8") as csv_report: + result_file = f"{username}.csv" + if args.folderoutput: + # The usernames results should be stored in a targeted folder. + # If the folder doesn't exist, create it first + os.makedirs(args.folderoutput, exist_ok=True) + result_file = os.path.join(args.folderoutput, result_file) + + with open(result_file, "w", newline='', encoding="utf-8") as csv_report: writer = csv.writer(csv_report) writer.writerow(['username', 'name', From a8fdc2eb1552630a579b6f2c5f7cd57ffb368380 Mon Sep 17 00:00:00 2001 From: "Christopher K. Hoadley" Date: Mon, 7 Dec 2020 18:28:37 -0600 Subject: [PATCH 2/2] Update version. --- README.md | 2 +- sherlock/sherlock.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1f64f53b..e6f441ab 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ usage: sherlock [-h] [--version] [--verbose] [--folderoutput FOLDEROUTPUT] [--browse] [--local] USERNAMES [USERNAMES ...] -Sherlock: Find Usernames Across Social Networks (Version 0.12.9) +Sherlock: Find Usernames Across Social Networks (Version 0.14.0) positional arguments: USERNAMES One or more usernames to check with social networks. diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index 73b8f8b6..b0051fcc 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -25,7 +25,7 @@ from notify import QueryNotifyPrint from sites import SitesInformation module_name = "Sherlock: Find Usernames Across Social Networks" -__version__ = "0.13.0" +__version__ = "0.14.0"