mirror of
https://github.com/sherlock-project/sherlock
synced 2024-11-25 21:30:24 +00:00
Do not create session and request objects if we are going to end up creating new one for Tor requests. This just wastes time.
This commit is contained in:
parent
8ef999fffd
commit
578248bf8e
1 changed files with 5 additions and 2 deletions
|
@ -168,11 +168,14 @@ def sherlock(username, site_data, verbose=False, tor=False, unique_tor=False, pr
|
|||
executor = ThreadPoolExecutor(max_workers=len(site_data))
|
||||
|
||||
# Create session based on request methodology
|
||||
underlying_session = requests.session()
|
||||
underlying_request = requests.Request()
|
||||
if tor or unique_tor:
|
||||
#Requests using Tor obfuscation
|
||||
underlying_request = TorRequest()
|
||||
underlying_session = underlying_request.session
|
||||
else:
|
||||
#Normal requests
|
||||
underlying_session = requests.session()
|
||||
underlying_request = requests.Request()
|
||||
|
||||
# Create multi-threaded session for all requests. Use our custom FuturesSession that exposes response time
|
||||
session = ElapsedFuturesSession(
|
||||
|
|
Loading…
Reference in a new issue