diff --git a/sherlock_project/sherlock.py b/sherlock_project/sherlock.py index 250175a..09caca4 100644 --- a/sherlock_project/sherlock.py +++ b/sherlock_project/sherlock.py @@ -171,8 +171,6 @@ def sherlock( username: str, site_data: dict[str, dict[str, str]], query_notify: QueryNotify, - tor: bool = False, - unique_tor: bool = False, dump_response: bool = False, proxy: Optional[str] = None, timeout: int = 60, @@ -188,8 +186,6 @@ def sherlock( query_notify -- Object with base type of QueryNotify(). This will be used to notify the caller about query results. - tor -- Boolean indicating whether to use a tor circuit for the requests. - unique_tor -- Boolean indicating whether to use a new tor circuit for each request. proxy -- String indicating the proxy URL timeout -- Time in seconds to wait before timing out request. Default is 60 seconds. @@ -211,31 +207,9 @@ def sherlock( # Notify caller that we are starting the query. query_notify.start(username) # Create session based on request methodology - if tor or unique_tor: - try: - from torrequest import TorRequest # noqa: E402 - except ImportError: - print("Important!") - print("> --tor and --unique-tor are now DEPRECATED, and may be removed in a future release of Sherlock.") - print("> If you've installed Sherlock via pip, you can include the optional dependency via `pip install 'sherlock-project[tor]'`.") - print("> Other packages should refer to their documentation, or install it separately with `pip install torrequest`.\n") - sys.exit(query_notify.finish()) - - print("Important!") - print("> --tor and --unique-tor are now DEPRECATED, and may be removed in a future release of Sherlock.") - - # Requests using Tor obfuscation - try: - underlying_request = TorRequest() - except OSError: - print("Tor not found in system path. Unable to continue.\n") - sys.exit(query_notify.finish()) - underlying_session = underlying_request.session - else: - # Normal requests - underlying_session = requests.session() - underlying_request = requests.Request() + underlying_session = requests.session() + underlying_request = requests.Request() # Limit number of workers to 20. # This is probably vastly overkill. @@ -359,10 +333,6 @@ def sherlock( # Store future in data for access later net_info["request_future"] = future - # Reset identify for tor (if needed) - if unique_tor: - underlying_request.reset_identity() - # Add this site's results into final dictionary with all the other results. results_total[social_network] = results_site @@ -596,22 +566,6 @@ def main(): dest="output", help="If using single username, the output of the result will be saved to this file.", ) - parser.add_argument( - "--tor", - "-t", - action="store_true", - dest="tor", - default=False, - help="Make requests over Tor; increases runtime; requires Tor to be installed and in system path.", - ) - parser.add_argument( - "--unique-tor", - "-u", - action="store_true", - dest="unique_tor", - default=False, - help="Make requests over Tor with new Tor circuit after each request; increases runtime; requires Tor to be installed and in system path.", - ) parser.add_argument( "--csv", action="store_true", @@ -755,22 +709,10 @@ def main(): except Exception as error: print(f"A problem occurred while checking for an update: {error}") - # Argument check - # TODO regex check on args.proxy - if args.tor and (args.proxy is not None): - raise Exception("Tor and Proxy cannot be set at the same time.") - # Make prompts if args.proxy is not None: print("Using the proxy: " + args.proxy) - if args.tor or args.unique_tor: - print("Using Tor to make requests") - - print( - "Warning: some websites might refuse connecting over Tor, so note that using this option might increase connection errors." - ) - if args.no_color: # Disable color output. init(strip=True, convert=False) @@ -871,8 +813,6 @@ def main(): username, site_data, query_notify, - tor=args.tor, - unique_tor=args.unique_tor, dump_response=args.dump_response, proxy=args.proxy, timeout=args.timeout,