From c96581e327e492277ab518d18cc2bb450500f66f Mon Sep 17 00:00:00 2001 From: Siddharth Dushantha Date: Mon, 6 Mar 2023 09:31:39 +0100 Subject: [PATCH 1/2] apply --print-found when writing csv/xlsx files as well credits @acrulopez --- sherlock/sherlock.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index b20a0e4..7256195 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -537,12 +537,12 @@ def main(): help="Time (in seconds) to wait for response to requests (Default: 60)" ) parser.add_argument("--print-all", - action="store_true", dest="print_all", + action="store_true", dest="print_all", default=False, help="Output sites where the username was not found." ) parser.add_argument("--print-found", - action="store_false", dest="print_all", default=False, - help="Output sites where the username was found." + action="store_true", dest="print_found", default=True, + help="Output sites where the username was found (also if exported as file)." ) parser.add_argument("--no-color", action="store_true", dest="no_color", default=False, @@ -640,7 +640,6 @@ def main(): site_data = site_data_all else: # User desires to selectively run queries on a sub-set of the site list. - # Make sure that the sites are supported & build up pruned site database. site_data = {} site_missing = [] @@ -668,7 +667,6 @@ def main(): browse=args.browse) # Run report on all specified users. - all_usernames = [] for username in args.username: if (CheckForParameter(username)): @@ -726,6 +724,9 @@ def main(): ] ) for site in results: + if args.print_found and not args.print_all and results[site]["status"].status != QueryStatus.CLAIMED: + continue + response_time_s = results[site]["status"].query_time if response_time_s is None: response_time_s = "" @@ -748,6 +749,9 @@ def main(): response_time_s = [] for site in results: + if args.print_found and not args.print_all and results[site]["status"].status != QueryStatus.CLAIMED: + continue + if response_time_s is None: response_time_s.append("") else: @@ -768,4 +772,3 @@ def main(): if __name__ == "__main__": main() - # Notify caller that all queries are finished. From 9a39956265b600207c2c139d158f936e44adeac8 Mon Sep 17 00:00:00 2001 From: Siddharth Dushantha Date: Mon, 6 Mar 2023 10:05:39 +0100 Subject: [PATCH 2/2] version bump 0.14.1 --> 0.14.2 --- sherlock/sherlock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index 7256195..9e87124 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -28,7 +28,7 @@ from sites import SitesInformation from colorama import init module_name = "Sherlock: Find Usernames Across Social Networks" -__version__ = "0.14.3" +__version__ = "0.14.2" class SherlockFuturesSession(FuturesSession):