@@ -171,8 +171,6 @@ def sherlock(
171
171
username : str ,
172
172
site_data : dict [str , dict [str , str ]],
173
173
query_notify : QueryNotify ,
174
- tor : bool = False ,
175
- unique_tor : bool = False ,
176
174
dump_response : bool = False ,
177
175
proxy : Optional [str ] = None ,
178
176
timeout : int = 60 ,
@@ -188,8 +186,6 @@ def sherlock(
188
186
query_notify -- Object with base type of QueryNotify().
189
187
This will be used to notify the caller about
190
188
query results.
191
- tor -- Boolean indicating whether to use a tor circuit for the requests.
192
- unique_tor -- Boolean indicating whether to use a new tor circuit for each request.
193
189
proxy -- String indicating the proxy URL
194
190
timeout -- Time in seconds to wait before timing out request.
195
191
Default is 60 seconds.
@@ -210,32 +206,9 @@ def sherlock(
210
206
211
207
# Notify caller that we are starting the query.
212
208
query_notify .start (username )
213
- # Create session based on request methodology
214
- if tor or unique_tor :
215
- try :
216
- from torrequest import TorRequest # noqa: E402
217
- except ImportError :
218
- print ("Important!" )
219
- print ("> --tor and --unique-tor are now DEPRECATED, and may be removed in a future release of Sherlock." )
220
- print ("> If you've installed Sherlock via pip, you can include the optional dependency via `pip install 'sherlock-project[tor]'`." )
221
- print ("> Other packages should refer to their documentation, or install it separately with `pip install torrequest`.\n " )
222
- sys .exit (query_notify .finish ())
223
-
224
- print ("Important!" )
225
- print ("> --tor and --unique-tor are now DEPRECATED, and may be removed in a future release of Sherlock." )
226
-
227
- # Requests using Tor obfuscation
228
- try :
229
- underlying_request = TorRequest ()
230
- except OSError :
231
- print ("Tor not found in system path. Unable to continue.\n " )
232
- sys .exit (query_notify .finish ())
233
209
234
- underlying_session = underlying_request .session
235
- else :
236
- # Normal requests
237
- underlying_session = requests .session ()
238
- underlying_request = requests .Request ()
210
+ # Normal requests
211
+ underlying_session = requests .session ()
239
212
240
213
# Limit number of workers to 20.
241
214
# This is probably vastly overkill.
@@ -359,15 +332,10 @@ def sherlock(
359
332
# Store future in data for access later
360
333
net_info ["request_future" ] = future
361
334
362
- # Reset identify for tor (if needed)
363
- if unique_tor :
364
- underlying_request .reset_identity ()
365
-
366
335
# Add this site's results into final dictionary with all the other results.
367
336
results_total [social_network ] = results_site
368
337
369
338
# Open the file containing account links
370
- # Core logic: If tor requests, make them here. If multi-threaded requests, wait for responses
371
339
for social_network , net_info in site_data .items ():
372
340
# Retrieve results again
373
341
results_site = results_total .get (social_network )
@@ -600,22 +568,6 @@ def main():
600
568
dest = "output" ,
601
569
help = "If using single username, the output of the result will be saved to this file." ,
602
570
)
603
- parser .add_argument (
604
- "--tor" ,
605
- "-t" ,
606
- action = "store_true" ,
607
- dest = "tor" ,
608
- default = False ,
609
- help = "Make requests over Tor; increases runtime; requires Tor to be installed and in system path." ,
610
- )
611
- parser .add_argument (
612
- "--unique-tor" ,
613
- "-u" ,
614
- action = "store_true" ,
615
- dest = "unique_tor" ,
616
- default = False ,
617
- help = "Make requests over Tor with new Tor circuit after each request; increases runtime; requires Tor to be installed and in system path." ,
618
- )
619
571
parser .add_argument (
620
572
"--csv" ,
621
573
action = "store_true" ,
@@ -769,22 +721,10 @@ def main():
769
721
except Exception as error :
770
722
print (f"A problem occurred while checking for an update: { error } " )
771
723
772
- # Argument check
773
- # TODO regex check on args.proxy
774
- if args .tor and (args .proxy is not None ):
775
- raise Exception ("Tor and Proxy cannot be set at the same time." )
776
-
777
724
# Make prompts
778
725
if args .proxy is not None :
779
726
print ("Using the proxy: " + args .proxy )
780
727
781
- if args .tor or args .unique_tor :
782
- print ("Using Tor to make requests" )
783
-
784
- print (
785
- "Warning: some websites might refuse connecting over Tor, so note that using this option might increase connection errors."
786
- )
787
-
788
728
if args .no_color :
789
729
# Disable color output.
790
730
init (strip = True , convert = False )
@@ -885,8 +825,6 @@ def main():
885
825
username ,
886
826
site_data ,
887
827
query_notify ,
888
- tor = args .tor ,
889
- unique_tor = args .unique_tor ,
890
828
dump_response = args .dump_response ,
891
829
proxy = args .proxy ,
892
830
timeout = args .timeout ,
0 commit comments