Add exception handling for Tor option

This commit is contained in:
João Figueiredo 2024-03-01 09:45:28 -03:00
parent e3a09f8bf1
commit 50816be0c1
1 changed files with 6 additions and 1 deletions

View File

@ -200,7 +200,12 @@ def sherlock(
# Create session based on request methodology
if tor or unique_tor:
# Requests using Tor obfuscation
underlying_request = TorRequest()
try:
underlying_request = TorRequest()
except OSError:
print("Tor is not available on your system!")
sys.exit(query_notify.finish())
underlying_session = underlying_request.session
else:
# Normal requests