mirror of
https://github.com/sherlock-project/sherlock
synced 2024-11-26 22:00:27 +00:00
If the 'proxy_list' we select a random member and pass it as the proxy to the session. If the list is empty, the proxy parameter will be set to arg.proxy, which defaults to None if the user did not pass an individual proxy as well.
This commit is contained in:
parent
2accdcafea
commit
855f154d9b
1 changed files with 9 additions and 0 deletions
|
@ -534,6 +534,15 @@ def main():
|
|||
username + ".txt"), "w", encoding="utf-8")
|
||||
else:
|
||||
file = open(username + ".txt", "w", encoding="utf-8")
|
||||
|
||||
# We try to ad a random member of the 'proxy_list' var as the proxy of the request.
|
||||
# If we can't access the list or it is empty, we proceed with args.proxy as the proxy.
|
||||
try:
|
||||
random_proxy = random.choice(proxy_list)
|
||||
proxy = f'{random_proxy.protocol}://{random_proxy.ip}:{random_proxy.port}'
|
||||
except (NameError, IndexError):
|
||||
proxy = args.proxy
|
||||
|
||||
results = {}
|
||||
results = sherlock(username, site_data, verbose=args.verbose,
|
||||
tor=args.tor, unique_tor=args.unique_tor, proxy=args.proxy)
|
||||
|
|
Loading…
Reference in a new issue