From 6a723233a702429c12a3944437e9dfeeb9c907c5 Mon Sep 17 00:00:00 2001 From: pyghost <66232300+pyghost@users.noreply.github.com> Date: Fri, 21 Aug 2020 05:07:30 +0930 Subject: [PATCH] Added --local argument for local data.json use --- sherlock/sherlock.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index d15af535..35a3555a 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -490,6 +490,10 @@ def main(): parser.add_argument("--browse", "-b", action="store_true", dest="browse", default=False, help="Browse to all results on default browser.") + + parser.add_argument("--local", "-l", + action='store_true', default=None, + help="Forces the use of the local data.json file.") args = parser.parse_args() @@ -535,7 +539,10 @@ def main(): #Create object with all information about sites we are aware of. try: - sites = SitesInformation(args.json_file) + if args.local: + sites = SitesInformation(os.path.join(os.path.dirname(__file__), 'resources/data.json')) + else: + sites = SitesInformation(args.json_file) except Exception as error: print(f"ERROR: {error}") sys.exit(1)