| 1 | + | #!/usr/bin/python3 |
| 2 | + | |
1 | 3 | | import argparse |
2 | 4 | | import csv |
3 | 5 | | import math |
| skipped 14 lines |
18 | 20 | | from urllib3.exceptions import ProtocolError |
19 | 21 | | |
20 | 22 | | ENGINES = { |
21 | | - | "ahmia": "http://msydqstlz2kzerdg.onion", |
| 23 | + | "ahmia": "http://msydqstlz2kzerdg.onion", # Offline? |
22 | 24 | | "darksearchio": "http://darksearch.io", |
23 | 25 | | "onionland": "http://3bbad7fauom4d6sgppalyqddsqbf5u5p56b5k5uk2zxsy3d6ey2jobad.onion", |
24 | | - | "notevil": "http://hss3uro2hsxfogfq.onion", |
25 | | - | "darksearchenginer": "http://7pwy57iklvt6lyhe.onion", |
| 26 | + | "notevil": "http://hss3uro2hsxfogfq.onion", # Offline? |
| 27 | + | "darksearchenginer": "http://l4rsciqnpzdndt2llgjx3luvnxip7vbyj6k6nmdy4xs77tx6gkd24ead.onion", |
26 | 28 | | "phobos": "http://phobosxilamwcg75xt22id7aywkzol6q6rfl2flipcqoc4e4ahima5id.onion", |
27 | | - | "onionsearchserver": "http://oss7wrm7xvoub77o.onion", |
28 | | - | "torgle": "http://submarhglcl66nz6.onion/", |
29 | | - | "torgle1": "http://torgle5fj664v7pf.onion", |
30 | | - | "onionsearchengine": "http://onionf4j3fwqpeo5.onion", |
31 | | - | "tordex": "http://tordex7iie7z2wcg.onion", |
32 | | - | "tor66": "http://tor66sezptuu2nta.onion", |
33 | | - | "tormax": "http://tormaxunodsbvtgo.onion", |
34 | | - | "haystack": "http://haystakvxad7wbk5.onion", |
35 | | - | "multivac": "http://multivacigqzqqon.onion", |
36 | | - | "evosearch": "http://evo7no6twwwrm63c.onion", |
37 | | - | "deeplink": "http://deeplinkdeatbml7.onion", |
| 29 | + | "onionsearchserver": "http://3fzh7yuupdfyjhwt3ugzqqof6ulbcl27ecev33knxe3u7goi3vfn2qqd.onion", |
| 30 | + | "torgle": "http://no6m4wzdexe3auiupv2zwif7rm6qwxcyhslkcnzisxgeiw6pvjsgafad.onion", # "torgle" -> "Submarine" |
| 31 | + | "torgle1": "http://torgle5fj664v7pf.onion", # Offline? |
| 32 | + | "onionsearchengine": "http://onionf4j3fwqpeo5.onion", # Offline? |
| 33 | + | "tordex": "http://tordex7iie7z2wcg.onion", # Offline? |
| 34 | + | "tor66": "http://tor66sewebgixwhcqfnp5inzp5x5uohhdy3kvtnyfxc2e5mxiuh34iid.onion", |
| 35 | + | "tormax": "http://tormaxunodsbvtgo.onion", # Offline? |
| 36 | + | "haystack": "http://haystak5njsmn2hqkewecpaxetahtwhsbsa64jom2k22z5afxhnpxfid.onion", |
| 37 | + | "multivac": "http://multivacigqzqqon.onion", # Offline? |
| 38 | + | "evosearch": "http://evo7no6twwwrm63c.onion", # Offline? |
| 39 | + | "deeplink": "http://deeplinkdeatbml7.onion", # Offline? |
38 | 40 | | } |
39 | 41 | | |
40 | 42 | | desktop_agents = [ |
| 43 | + | 'Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0', # Tor Browser for Windows and Linux |
| 44 | + | 'Mozilla/5.0 (Android 10; Mobile; rv:91.0) Gecko/91.0 Firefox/91.0', # Tor Browser for Android |
41 | 45 | | 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36', |
42 | 46 | | 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36', |
43 | 47 | | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ' |
| skipped 32 lines |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | parser = argparse.ArgumentParser(epilog=print_epilog(), formatter_class=argparse.RawTextHelpFormatter) |
79 | | - | parser.add_argument("--proxy", default='localhost:9150', type=str, help="Set Tor proxy (default: 127.0.0.1:9150)") |
| 83 | + | parser.add_argument("--proxy", default='localhost:9050', type=str, help="Set Tor proxy (default: 127.0.0.1:9050)") |
80 | 84 | | parser.add_argument("--output", default='output_$SEARCH_$DATE.txt', type=str, |
81 | 85 | | help="Output File (default: output_$SEARCH_$DATE.txt), where $SEARCH is replaced by the first " |
82 | 86 | | "chars of the search string and $DATE is replaced by the datetime") |
| skipped 845 lines |
928 | 932 | | stats_dict[e] = 0 |
929 | 933 | | |
930 | 934 | | # Doing multiprocessing |
931 | | - | units = min((cpu_count() - 1), len(func_args)) |
932 | 935 | | if args.mp_units and args.mp_units > 0: |
933 | | - | units = min(args.mp_units, len(func_args)) |
| 936 | + | units = args.mp_units |
| 937 | + | else: |
| 938 | + | # Use (cores count - 1), but not less then one, threads |
| 939 | + | units = max((cpu_count() - 1), 1) |
934 | 940 | | print("search.py started with {} processing units...".format(units)) |
935 | 941 | | freeze_support() |
936 | 942 | | |
| skipped 25 lines |