Merge pull request #889 from sherlock-project/csv_directory_fix

Save csv file to output directory (if specified).
pull/890/head
Christopher Kent Hoadley 4 years ago committed by GitHub
commit ecf7e4d02f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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.

@ -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"
@ -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',

Loading…
Cancel
Save