├── .gitignore ├── Bluto ├── bluto ├── doc │ ├── countries.txt │ ├── lots-of-spinach.txt │ ├── sub_interest.txt │ ├── subdomains-top1mil-20000.txt │ └── user_agents.txt └── modules │ ├── __init__.py │ ├── bluto_logging.py │ ├── data_mine.py │ ├── general.py │ ├── get_dns.py │ ├── get_file.py │ ├── output.py │ ├── search.py │ └── update.py ├── LICENSE.txt ├── MANIFEST.in ├── README.md └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /Bluto/bluto: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Description: 6 | 7 | DNS Recon | Brute Forcer | DNS Zone Transfer | DNS Wild Card Checks | DNS Wild Card Brute Forcer 8 | Email Enumeration | Staff Enumeration | Compromised Account Enumeration | MetaData Harvesting 9 | 10 | Author: Darryl Lane 11 | Twitter: @darryllane101 12 | 13 | Usage: 14 | bluto [--domain=] [-e] [-u] [--timeout=] [--api=] 15 | bluto -h | --help 16 | bluto --version 17 | 18 | Options: 19 | bluto -e Large Subdomain list used for bruteforcing 20 | bluto -u Check for latest version of Bluto 21 | bluto --timeout Set DNS timeout in seconds 22 | bluto --domain Set target domain 23 | bluto --api Set Hunter API key 24 | bluto --help Help menu 25 | bluto --version Current Bluto version 26 | 27 | """ 28 | 29 | import sys 30 | import site 31 | import os 32 | 33 | SITES = site.getsitepackages() 34 | for item in SITES: 35 | if os.path.exists(item + "/Bluto/modules/__init__.py"): 36 | path = item 37 | sys.path.append(path + '/Bluto/') 38 | 39 | import time 40 | import threading 41 | import Queue 42 | import argparse 43 | import dns.resolver 44 | import dns.query 45 | import dns.zone 46 | from docopt import docopt 47 | from termcolor import colored 48 | from modules.get_dns import action_brute_start, action_wild_cards, action_zone_transfer, get_dns_details, action_brute_wild, set_resolver 49 | from modules.search import action_bing_true, action_google, action_linkedin, action_netcraft, action_emailHunter 50 | from modules.get_file import get_subs, get_sub_interest, get_line_count, get_user_agents 51 | from modules.general import action_country_id, action_whois, action_bluto_use, check_dom 52 | from modules.output import action_output_vuln_zone, action_output_wild_false, action_output_wild_false_hunter, action_output_vuln_zone_hunter 53 | from modules.data_mine import doc_start 54 | from modules.bluto_logging import info 55 | from modules.update import update, updateCheck 56 | 57 | FILENAME_1 = path + "/Bluto/doc/subdomains-top1mil-20000.txt" 58 | FILENAME_2 = path + "/Bluto/doc/sub_interest.txt" 59 | USERAGENT_F = path + "/Bluto/doc/user_agents.txt" 60 | COUNTRIES_FILE = path + "/Bluto/doc/countries.txt" 61 | INFO_LOG_FILE = os.path.expanduser('~/Bluto/log/bluto-info.log') 62 | 63 | version = '2.4.17' 64 | 65 | title = """ 66 | BBBBBBBBBBBBBBBBB lllllll tttt 67 | B::::::::::::::::B l:::::l ttt:::t 68 | B::::::BBBBBB:::::Bl:::::l t:::::t 69 | BB:::::B B:::::l:::::l{0} t:::::t 70 | B::::B B:::::Bl::::luuuuuu uuuuuttttttt:::::ttttttt ooooooooooo 71 | B::::B B:::::Bl::::lu::::u u::::t:::::::::::::::::t oo:::::::::::oo 72 | B::::BBBBBB:::::B l::::lu::::u u::::t:::::::::::::::::t o:::::::::::::::o 73 | B:::::::::::::BB l::::lu::::u u::::tttttt:::::::tttttt o:::::ooooo:::::o 74 | B::::BBBBBB:::::B l::::lu::::u u::::u t:::::t o::::o o::::o 75 | B::::B B:::::Bl::::lu::::u u::::u t:::::t o::::o o::::o 76 | B::::B B:::::Bl::::lu::::u u::::u t:::::t o::::o o::::o 77 | B::::B B:::::Bl::::lu:::::uuuu:::::u t:::::t ttttto::::o o::::o 78 | BB:::::BBBBBB::::::l::::::u:::::::::::::::uu t::::::tttt:::::o:::::ooooo:::::o 79 | B:::::::::::::::::Bl::::::lu:::::::::::::::u tt::::::::::::::o:::::::::::::::o 80 | B::::::::::::::::B l::::::l uu::::::::uu:::u tt:::::::::::ttoo:::::::::::oo 81 | BBBBBBBBBBBBBBBBB llllllll uuuuuuuu uuuu ttttttttttt ooooooooooo 82 | """.format(colored("v" + version, 'red')) 83 | 84 | desc = """ {2} | {3} | {4} | {9} 85 | {8} | {7} | {10} 86 | {11} | {12} 87 | 88 | {0} | {1} 89 | {5} 90 | """ . format (colored("Author: Darryl Lane", 'blue'), colored("Twitter: @darryllane101", 'blue'), colored("DNS Recon", 'green'), colored("SubDomain Brute Forcer", 'green'), colored("DNS Zone Transfers", 'green'), colored("https://github.com/darryllane/Bluto", 'green'), colored("v" + version, 'red'), colored("Email Enumeration", 'green'), colored("Staff Enumeration", 'green'), colored("DNS Wild Card Checks", 'green'), colored("DNS Wild Card Brute Forcer", 'green'), colored("Compromised Account Enumeration", 'green'), colored("MetaData Mining", 'green')) 91 | 92 | prox = False 93 | 94 | if __name__ == "__main__": 95 | info('\nBluto Started') 96 | args = docopt(__doc__, version=version) 97 | print title 98 | print desc 99 | #Check Arguments 100 | try: 101 | 102 | if args['-u']: 103 | info('Checking For Update') 104 | updateCheck(version) 105 | 106 | if args['--timeout']: 107 | timeout_value = args['--timeout'] 108 | myResolver = set_resolver(timeout_value) 109 | else: 110 | myResolver = dns.resolver.Resolver() 111 | myResolver.timeout = 10 112 | myResolver.lifetime = 10 113 | myResolver.nameservers = ['8.8.8.8', '8.8.4.4'] 114 | 115 | if args['-e']: 116 | info('-e Argument Used') 117 | FILENAME_1 = path + "/Bluto/doc/lots-of-spinach.txt" 118 | 119 | if args['--api']: 120 | api = args['--api'] 121 | info('-api Argument Used with api: ' + str(api)) 122 | else: 123 | api = False 124 | 125 | if args['--domain']: 126 | domain = args['--domain'] 127 | else: 128 | domain = raw_input("Target Domain: ") 129 | 130 | user_agents = get_user_agents(USERAGENT_F) 131 | info('Domain Identified: ' + str(domain)) 132 | domain_r = domain.split('.') 133 | report_location = os.path.expanduser('~/Bluto/Bluto-Evidence-{}.html'.format(domain_r[0])) 134 | #Check if domain valid 135 | check_dom(domain, myResolver) 136 | #WhoisGet 137 | company = action_whois(domain) 138 | #Detail Call 139 | sub_intrest = get_sub_interest(FILENAME_2, domain) 140 | zn_list = get_dns_details(domain, myResolver) 141 | #NetCraft Call 142 | netcraft_list = action_netcraft(domain, myResolver) 143 | #ZoneTrans Call 144 | vulnerable_results = action_zone_transfer(zn_list, domain) 145 | if vulnerable_results == ([], []): 146 | print "\nNone of the Name Servers are vulnerable to Zone Transfers" 147 | #Testing For Wild Cards 148 | print '\nTesting For Wild Cards' 149 | value = action_wild_cards(domain, myResolver) 150 | #Wild Cards True 151 | if value == True: 152 | print colored('\n\tWild Cards Are In Place', 'green') 153 | print colored("\n\tOh no! You ain't eatin' no spinach in this picture", 'blue') 154 | print colored("\n\nThis Will Take A While Longer, On Average +- 20min", 'grey') 155 | check_count = get_line_count(FILENAME_1) 156 | #Grabbing Subs 157 | subs = get_subs(FILENAME_1, domain) 158 | print '\nGathering Data From Google, Bing And LinkedIn' 159 | #Checking Request Country 160 | userCountry, userServer = action_country_id(COUNTRIES_FILE, prox) 161 | action_bluto_use(userCountry) 162 | start_time_total = time.time() 163 | #Executing Jobs 164 | q1 = Queue.Queue() 165 | q2 = Queue.Queue() 166 | q3 = Queue.Queue() 167 | q5 = Queue.Queue() 168 | t1 = threading.Thread(target=action_google, args=(domain, userCountry, userServer, q1, user_agents, prox)) 169 | t2 = threading.Thread(target=action_bing_true, args=(domain, q2, user_agents, prox)) 170 | t3 = threading.Thread(target=action_linkedin, args=(domain, userCountry, q3, company, user_agents, prox)) 171 | t5 = threading.Thread(target=doc_start, args=(domain, user_agents, prox, q5)) 172 | start_time_email = time.time() 173 | if api: 174 | q4 = Queue.Queue() 175 | t4 = threading.Thread(target=action_emailHunter, args=(domain, api, user_agents, q4, prox)) #Takes domain[str], api[list], user_agents[list] #Returns email,url [list[tuples]] Queue[object], prox[str] 176 | t4.start() 177 | t4.join() 178 | else: 179 | print colored('\nDon\'t forget you can increase your identified email count significantly with a free Hunter API key.\nhttps://hunter.io/api_keys', 'green') 180 | t1.start() 181 | t1.join() 182 | t2.start() 183 | t2.join() 184 | time_spent_email = time.time() - start_time_email 185 | t3.start() 186 | t3.join() 187 | start_download_time = time.time() 188 | t5.start() 189 | t5.join() 190 | time_spent_download = time.time() - start_download_time 191 | google_true_results = q1.get() 192 | bing_true_results = q2.get() 193 | linkedin_results = q3.get() 194 | data_mine = q5.get() 195 | start_time_brute = time.time() 196 | targets_t = action_brute_start(subs, myResolver) 197 | targets = action_brute_wild(targets_t, domain, myResolver) 198 | time_spent_brute = time.time() - start_time_brute 199 | time_spent_total = time.time() - start_time_total 200 | if targets == []: 201 | targets.append("temp-enter") 202 | domains = list(set(targets + netcraft_list)) 203 | domains.sort() 204 | if "temp-enter" in domains: domains.remove("temp-enter") 205 | brute_results_dict = dict((x.split(' ') for x in domains)) 206 | #Outputing data 207 | if api: 208 | emailHunter_results = q4.get() 209 | action_output_wild_false_hunter(brute_results_dict, sub_intrest, google_true_results, bing_true_results, linkedin_results, check_count, domain, time_spent_email, time_spent_brute, time_spent_total, emailHunter_results, args, report_location, company, data_mine) 210 | else: 211 | action_output_wild_false(brute_results_dict, sub_intrest, google_true_results, bing_true_results, linkedin_results, check_count, domain, time_spent_email, time_spent_brute, time_spent_total, report_location, company, data_mine) 212 | #WildCards False 213 | else: 214 | print colored('\n\tWild Cards Are Not In Place', 'red') 215 | check_count = get_line_count(FILENAME_1) 216 | #Grabbing Subs 217 | subs = get_subs(FILENAME_1, domain) 218 | print '\nGathering Data From Google, Bing And LinkedIn' 219 | #Checking Request Country 220 | userCountry, userServer = action_country_id(COUNTRIES_FILE, prox) 221 | action_bluto_use(userCountry) 222 | start_time_total = time.time() 223 | #Executing Jobs 224 | q1 = Queue.Queue() 225 | q2 = Queue.Queue() 226 | q3 = Queue.Queue() 227 | q5 = Queue.Queue() 228 | t1 = threading.Thread(target=action_google, args=(domain, userCountry, userServer, q1, user_agents, prox)) 229 | t2 = threading.Thread(target=action_bing_true, args=(domain, q2, user_agents, prox)) 230 | t3 = threading.Thread(target=action_linkedin, args=(domain, userCountry, q3, company, user_agents, prox)) 231 | t5 = threading.Thread(target=doc_start, args=(domain, user_agents, prox, q5)) 232 | start_time_email = time.time() 233 | if api: 234 | q4 = Queue.Queue() 235 | t4 = threading.Thread(target=action_emailHunter, args=(domain, api, user_agents, q4, prox)) #Takes domain[str], api[list], user_agents[list] #Returns email,url [list[tuples]] Queue[object], prox[str] 236 | t4.start() 237 | t4.join() 238 | else: 239 | print colored('\nDon\'t forget you can increase your identified email count significantly with a free Hunter API key.\nhttps://hunter.io/api_keys', 'green') 240 | t1.start() 241 | t1.join() 242 | t2.start() 243 | t2.join() 244 | time_spent_email = time.time() - start_time_email 245 | t3.start() 246 | t3.join() 247 | start_download_time = time.time() 248 | t5.start() 249 | t5.join() 250 | 251 | time_spent_download = time.time() - start_download_time 252 | google_true_results = q1.get() 253 | bing_true_results = q2.get() 254 | linkedin_results = q3.get() 255 | if q5.empty(): 256 | q5.put(None) 257 | data_mine = q5.get() 258 | start_time_brute = time.time() 259 | targets = action_brute_start(subs, myResolver) 260 | time_spent_brute = time.time() - start_time_brute 261 | time_spent_total = time.time() - start_time_total 262 | #Clean Brute Results 263 | if targets == []: 264 | targets.append("temp-enter") 265 | domains = list(set(targets + netcraft_list)) 266 | domains.sort() 267 | if "temp-enter" in domains: domains.remove("temp-enter") 268 | brute_results_dict = dict((x.split(' ') for x in domains)) 269 | if api: 270 | emailHunter_results = q4.get() 271 | action_output_wild_false_hunter(brute_results_dict, sub_intrest, google_true_results, bing_true_results, linkedin_results, check_count, domain, time_spent_email, time_spent_brute, time_spent_total, emailHunter_results, args, report_location, company, data_mine) 272 | #Outputing data 273 | else: 274 | action_output_wild_false(brute_results_dict, sub_intrest, google_true_results, bing_true_results, linkedin_results, check_count, domain, time_spent_email, time_spent_brute, time_spent_total, report_location, company, data_mine) 275 | else: 276 | #Vuln Zone Trans 277 | vulnerable_list = vulnerable_results[0] 278 | clean_dump = vulnerable_results[1] 279 | print '\nGathering Data From Google, Bing And LinkedIn' 280 | userCountry, userServer = action_country_id(COUNTRIES_FILE, prox) 281 | action_bluto_use(userCountry) 282 | start_time_total = time.time() 283 | q1 = Queue.Queue() 284 | q2 = Queue.Queue() 285 | q3 = Queue.Queue() 286 | q5 = Queue.Queue() 287 | t1 = threading.Thread(target=action_google, args=(domain, userCountry, userServer, q1, user_agents, prox)) 288 | t2 = threading.Thread(target=action_bing_true, args=(domain, q2, user_agents, prox)) 289 | t3 = threading.Thread(target=action_linkedin, args=(domain, userCountry, q3, company, user_agents, prox)) 290 | t5 = threading.Thread(target=doc_start, args=(domain, user_agents, prox, q5)) 291 | start_time_email = time.time() 292 | if api: 293 | q4 = Queue.Queue() 294 | t4 = threading.Thread(target=action_emailHunter, args=(domain, api, user_agents, q4, prox)) #Takes domain[str], api[list], user_agents[list] #Returns email,url [list[tuples]] Queue[object], prox[str] 295 | t4.start() 296 | t4.join() 297 | else: 298 | print colored('\nDon\'t forget you can increase your identified email count significantly with a free Hunter API key.\nhttps://hunter.io/api_keys', 'green') 299 | t1.start() 300 | t1.join() 301 | t2.start() 302 | t2.join() 303 | time_spent_email = time.time() - start_time_email 304 | t3.start() 305 | t3.join() 306 | start_download_time = time.time() 307 | t5.start() 308 | t5.join() 309 | time_spent_download = time.time() - start_download_time 310 | google_results = q1.get() 311 | bing_results = q2.get() 312 | linkedin_results = q3.get() 313 | data_mine = q5.get() 314 | time_spent_total = time.time() - start_time_total 315 | #Outputing data 316 | if api: 317 | emailHunter_results = q4.get() 318 | action_output_vuln_zone_hunter(google_results, bing_results, linkedin_results, time_spent_email, time_spent_total, clean_dump, sub_intrest, domain, emailHunter_results, args, report_location, company, data_mine) 319 | else: 320 | action_output_vuln_zone(google_results, bing_results, linkedin_results, time_spent_email, time_spent_total, clean_dump, sub_intrest, domain, report_location, company, data_mine) 321 | 322 | info('Bluto Finished') 323 | except KeyboardInterrupt: 324 | print '\n\nRage Quit!..' 325 | info('Keyboard Interrupt From User\n') 326 | sys.exit() 327 | except Exception,e: 328 | print e 329 | -------------------------------------------------------------------------------- /Bluto/doc/countries.txt: -------------------------------------------------------------------------------- 1 | Afghanistan;http://www.google.com.af 2 | American Samoa;http://www.google.as 3 | Anguilla;http://www.google.off.ai 4 | Argentina;http://www.google.com.ar 5 | Armenia;http://www.google.am 6 | Australia;http://www.google.com.au 7 | Austria;http://www.google.at 8 | Azerbaijan;http://www.google.az 9 | Bahamas;http://www.google.bs 10 | Bahrain;http://www.google.com.bh 11 | Bangladesh;http://www.google.com.bd 12 | Belgium;http://www.google.be 13 | Belize;http://www.google.com.bz 14 | Bolivia;http://www.google.com.bo 15 | Botswana;http://www.google.co.bw 16 | Brazil;http://www.google.com.br 17 | Bulgaria;http://www.google.bg 18 | Burundi;http://www.google.bi 19 | Canada;http://www.google.ca 20 | Chile;http://www.google.cl 21 | China;http://www.google.cn 22 | Colombia;http://www.google.com.co 23 | Congo;http://www.google.cg 24 | Cook Islands;http://www.google.co.ck 25 | Costa Rica;http://www.google.co.cr 26 | Cote D'Ivoire;http://www.google.ci 27 | Croatia;http://www.google.hr 28 | Cuba;http://www.google.com.cu 29 | Czech Republic;http://www.google.cz 30 | Denmark;http://www.google.dk 31 | Djibouti;http://www.google.dj 32 | Dominica;http://www.google.dm 33 | Dominican Republic;http://www.google.cd 34 | Ecuador;http://www.google.com.ec 35 | Egypt;http://www.google.com.eg 36 | El Salvador;http://www.google.com.sv 37 | Estonia;http://www.google.ee 38 | Ethiopia;http://www.google.com.et 39 | Fiji;http://www.google.com.fj 40 | Finland;http://www.google.fi 41 | France;http://www.google.fr 42 | Gambia;http://www.google.gm 43 | Georgia;http://www.google.ge 44 | Germany;http://www.google.de 45 | Gibraltar;http://www.google.com.gi 46 | Greece;http://www.google.gr 47 | Greenland;http://www.google.gl 48 | Guatemala;http://www.google.com.gt 49 | Guernsey;http://www.google.gg 50 | Guyana;http://www.google.gy 51 | Haiti;http://www.google.ht 52 | Honduras;http://www.google.hn 53 | Hong Kong;http://www.google.com.hk 54 | Hungary;http://www.google.hu 55 | Iceland;http://www.google.is 56 | India;http://www.google.co.in 57 | Indonesia;http://www.google.co.id 58 | Ireland;http://www.google.ie 59 | Isle of Man;http://www.google.co.im 60 | Israel;http://www.google.co.il 61 | Italy;http://www.google.it 62 | Jamaica;http://www.google.com.jm 63 | Japan;http://www.google.co.jp 64 | Jersey;http://www.google.co.je 65 | Jordan;http://www.google.jo 66 | Kazakhstan;http://www.google.kz 67 | Kenya;http://www.google.co.ke 68 | Korea;http://www.google.co.kr 69 | Kyrgyzstan;http://www.google.kg 70 | Latvia;http://www.google.lv 71 | Lesotho;http://www.google.co.ls 72 | Libya;http://www.google.com.ly 73 | Liechtenstein;http://www.google.li 74 | Lithuania;http://www.google.lt 75 | Luxembourg;http://www.google.lu 76 | Malawi;http://www.google.mw 77 | Malaysia;http://www.google.com.my 78 | Malta;http://www.google.com.mt 79 | Mauritius;http://www.google.mu 80 | Mexico;http://www.google.com.mx 81 | Micronesia;http://www.google.fm 82 | Moldova;http://www.google.md 83 | Mongolia;http://www.google.mn 84 | Montserrat;http://www.google.ms 85 | Morocco;http://www.google.co.ma 86 | Namibia;http://www.google.com.na 87 | Nauru;http://www.google.nr 88 | Nepal;http://www.google.com.np 89 | Netherlands;http://www.google.nl 90 | New Zealand;http://www.google.co.nz 91 | Nicaragua;http://www.google.com.ni 92 | Nigeria;http://www.google.com.ng 93 | Niue;http://www.google.nu 94 | Norfolk Island;http://www.google.com.nf 95 | Norway;http://www.google.no 96 | Oman;http://www.google.com.om 97 | Pakistan;http://www.google.com.pk 98 | Panama;http://www.google.com.pa 99 | Paraguay;http://www.google.com.py 100 | Peru;http://www.google.com.pe 101 | Philippines;http://www.google.com.ph 102 | Pitcairn Islands;http://www.google.pn 103 | Poland;http://www.google.pl 104 | Portugal;http://www.google.pt 105 | Puerto Rico;http://www.google.com.pr 106 | Qatar;http://www.google.com.qa 107 | Romania;http://www.google.ro 108 | Russian Federation;http://www.google.ru 109 | Rwanda;http://www.google.rw 110 | Saint Helena;http://www.google.sh 111 | Samoa;http://www.google.ws 112 | San Marino;http://www.google.sm 113 | Saudi Arabia;http://www.google.com.sa 114 | Senegal;http://www.google.sn 115 | Seychelles;http://www.google.sc 116 | Singapore;http://www.google.com.sg 117 | Slovakia;http://www.google.sk 118 | Slovenia;http://www.google.si 119 | Solomon Islands;http://www.google.com.sb 120 | South Africa;http://www.google.co.za 121 | Spain;http://www.google.es 122 | Sri Lanka;http://www.google.lk 123 | Sweden;http://www.google.se 124 | Switzerland;http://www.google.ch 125 | Taiwan;http://www.google.com.tw 126 | Tajikistan;http://www.google.com.tj 127 | Thailand;http://www.google.co.th 128 | Tonga;http://www.google.to 129 | Trinidad and Tobago;http://www.google.tt 130 | Turkey;http://www.google.com.tr 131 | Turkmenistan;http://www.google.tm 132 | Uganda;http://www.google.co.ug 133 | Ukraine;http://www.google.com.ua 134 | United Kingdom;http://www.google.co.uk 135 | United States;http://www.google.com 136 | Uruguay;http://www.google.com.uy 137 | Uzbekistan;http://www.google.co.uz 138 | Vanuatu;http://www.google.vu 139 | Venezuela;http://www.google.co.ve 140 | Vietnam;http://www.google.com.vn 141 | Virgin Islands;http://www.google.co.vi 142 | Zambia;http://www.google.co.zm -------------------------------------------------------------------------------- /Bluto/doc/sub_interest.txt: -------------------------------------------------------------------------------- 1 | owa 2 | dev 3 | gateway 4 | servicedesk 5 | mail 6 | securemail 7 | secure 8 | vpn 9 | webmail 10 | citrix 11 | admin 12 | sqlserver 13 | sql 14 | oracle 15 | test 16 | ftp 17 | pop 18 | wiki 19 | portal 20 | www1 21 | www2 22 | www3 23 | www4 24 | remote 25 | access 26 | cag 27 | files 28 | upload 29 | view 30 | config 31 | support 32 | members 33 | intranet 34 | email -------------------------------------------------------------------------------- /Bluto/modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/darryllane/Bluto/25cad7ad532ab0b0f88e8eff89a87e61ed8999cb/Bluto/modules/__init__.py -------------------------------------------------------------------------------- /Bluto/modules/bluto_logging.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import logging 4 | import sys 5 | import site 6 | import os 7 | LOG_DIR = os.path.expanduser('~/Bluto/log/') 8 | INFO_LOG_FILE = os.path.expanduser(LOG_DIR + 'bluto-info.log') 9 | 10 | if not os.path.exists(LOG_DIR): 11 | os.makedirs(LOG_DIR) 12 | os.chmod(LOG_DIR, 0700) 13 | open(INFO_LOG_FILE,'a').close() 14 | 15 | # set up formatting 16 | formatter = logging.Formatter('[%(asctime)s] %(module)s: %(message)s') 17 | 18 | # set up logging to a file for all levels WARNING and higher 19 | fh2 = logging.FileHandler(INFO_LOG_FILE) 20 | fh2.setLevel(logging.INFO) 21 | fh2.setFormatter(formatter) 22 | 23 | # create Logger object 24 | mylogger = logging.getLogger('MyLogger') 25 | mylogger.setLevel(logging.INFO) 26 | mylogger.addHandler(fh2) 27 | 28 | # create shortcut functions 29 | info = mylogger.info 30 | -------------------------------------------------------------------------------- /Bluto/modules/data_mine.py: -------------------------------------------------------------------------------- 1 | import pdfminer 2 | import requests 3 | import urllib2 4 | import olefile 5 | import os 6 | import traceback 7 | import time 8 | import re 9 | import random 10 | import math 11 | import sys 12 | import Queue 13 | import time 14 | import threading 15 | import cgi 16 | from termcolor import colored 17 | from pdfminer.pdfparser import PDFParser 18 | from pdfminer.pdfdocument import PDFDocument 19 | from bs4 import BeautifulSoup 20 | from bluto_logging import info, INFO_LOG_FILE 21 | from get_file import get_user_agents 22 | from search import doc_bing, doc_exalead 23 | from general import get_size 24 | 25 | 26 | 27 | def action_download(doc_list, docs): 28 | info('Document Download Started') 29 | i = 0 30 | download_list = [] 31 | initial_count = 0 32 | print 'Gathering Live Documents For Metadata Mining\n' 33 | headers = { 34 | 'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB7.1 ( .NET CLR 3.5.30729', 35 | 'Referer': 'https://www.google.co.uk/', 36 | 'Accept-Language': 'en-US,en;q=0.5', 37 | 'Cache-Control': 'no-cache' 38 | } 39 | for doc in doc_list: 40 | doc = doc.replace(' ', '%20') 41 | try: 42 | r = requests.get(doc.encode('utf-8'), headers=headers, verify=False) 43 | if r.status_code == 404: 44 | r.raise_for_status() 45 | 46 | if r.status_code == 200: 47 | params = cgi.parse_header(r.headers.get('Content-Disposition', ''))[-1] 48 | if 'filename' not in params: 49 | filename = str(doc).replace('%20', ' ').split('/')[-1] 50 | with open(docs + filename, "w") as code: 51 | i += 1 52 | code.write(r.content) 53 | code.close() 54 | initial_count += 1 55 | print('\tDownload Count: {}\r'.format(str(initial_count))), 56 | info(str(doc).replace('%20', ' ')) 57 | download_list.append(str(doc).replace('%20', ' ')) 58 | 59 | continue 60 | else: 61 | filename_t = re.search('filename="(.*)"', r.headers['content-disposition']) 62 | filename = filename_t.group(1) 63 | 64 | with open(docs + filename, "w") as code: 65 | i += 1 66 | code.write(r.content) 67 | code.close() 68 | initial_count += 1 69 | print('\tDownload Count: {}\r'.format(str(initial_count))), 70 | download_list.append(str(doc).replace('%20', ' ')) 71 | info(str(doc).replace('%20', ' ')) 72 | continue 73 | 74 | 75 | except ValueError: 76 | info('No Filename in header') 77 | pass 78 | except AttributeError: 79 | pass 80 | except IOError: 81 | info('Not Found: {}'.format(str(doc).replace('%20', ' '))) 82 | pass 83 | except requests.exceptions.HTTPError: 84 | info('Error: File Not Found Server Side: HTTPError') 85 | pass 86 | except requests.exceptions.ConnectionError: 87 | info('Error: File Not Found Server Side: ConnectionError') 88 | pass 89 | except KeyError: 90 | pass 91 | except UnboundLocalError: 92 | pass 93 | except Exception: 94 | info('An Unhandled Exception Has Occured, Please Check The Log For Details\n' + INFO_LOG_FILE) 95 | info(str(doc).replace('%20', ' ')) 96 | pass 97 | if i < 1: 98 | return download_list 99 | data_size = get_size(docs) 100 | print '\tData Downloaded: {}MB'.format(str(math.floor(data_size))) 101 | info('Documents Downloaded: {}'.format(initial_count)) 102 | return download_list 103 | 104 | 105 | def doc_search(domain, USERAGENT_F, prox): 106 | q1 = Queue.Queue() 107 | q2 = Queue.Queue() 108 | t1 = threading.Thread(target=doc_bing, args=(domain, USERAGENT_F, prox, q1)) 109 | t2 = threading.Thread(target=doc_exalead, args=(domain, USERAGENT_F, prox, q2)) 110 | t1.start() 111 | t2.start() 112 | t1.join() 113 | t2.join() 114 | bing = q1.get() 115 | exalead = q2.get() 116 | list_d = bing + exalead 117 | return list_d 118 | 119 | 120 | #Extract Author PDF 121 | def pdf_read(pdf_file_list): 122 | info('Extracting PDF MetaData') 123 | software_list = [] 124 | user_names = [] 125 | for filename in pdf_file_list: 126 | info(filename) 127 | try: 128 | 129 | fp = open(filename, 'rb') 130 | parser = PDFParser(fp) 131 | doc = PDFDocument(parser) 132 | software = re.sub('[^0-9a-zA-Z]+', ' ', doc.info[0]['Creator']) 133 | person = re.sub('[^0-9a-zA-Z]+', ' ', doc.info[0]['Author']) 134 | if person: 135 | oddity = re.match('(\s\w\s+(\w\s+)+\w)', person) 136 | if oddity: 137 | oddity = str(oddity.group(1)).replace(' ', '') 138 | user_names.append(str(oddity).title()) 139 | else: 140 | user_names.append(str(person).title()) 141 | if software: 142 | oddity2 = re.match('(\s\w\s+(\w\s+)+\w)', software) 143 | if oddity2: 144 | oddity2 = str(oddity2.group(1)).replace(' ', '') 145 | software_list.append(oddity2) 146 | else: 147 | software_list.append(software) 148 | except IndexError: 149 | continue 150 | except pdfminer.pdfparser.PDFSyntaxError: 151 | continue 152 | except KeyError: 153 | continue 154 | except TypeError: 155 | continue 156 | except Exception: 157 | info('An Unhandled Exception Has Occured, Please Check The Log For Details' + INFO_LOG_FILE) 158 | continue 159 | info('Finished Extracting PDF MetaData') 160 | return (user_names, software_list) 161 | 162 | 163 | 164 | #Extract Author MS FILES 165 | def ms_doc(ms_file_list): 166 | software_list = [] 167 | user_names = [] 168 | info('Extracting MSDOCS MetaData') 169 | for filename in ms_file_list: 170 | try: 171 | data = olefile.OleFileIO(filename) 172 | meta = data.get_metadata() 173 | author = re.sub('[^0-9a-zA-Z]+', ' ', meta.author) 174 | company = re.sub('[^0-9a-zA-Z]+', ' ', meta.company) 175 | software = re.sub('[^0-9a-zA-Z]+', ' ', meta.creating_application) 176 | save_by = re.sub('[^0-9a-zA-Z]+', ' ', meta.last_saved_by) 177 | if author: 178 | oddity = re.match('(\s\w\s+(\w\s+)+\w)', author) 179 | if oddity: 180 | oddity = str(oddity.group(1)).replace(' ', '') 181 | user_names.append(str(oddity).title()) 182 | else: 183 | user_names.append(str(author).title()) 184 | if software: 185 | oddity2 = re.match('(\s\w\s+(\w\s+)+\w)', software) 186 | if oddity2: 187 | oddity2 = str(oddity2.group(1)).replace(' ', '') 188 | software_list.append(oddity2) 189 | else: 190 | software_list.append(software) 191 | 192 | if save_by: 193 | oddity3 = re.match('(\s\w\s+(\w\s+)+\w)', save_by) 194 | if oddity3: 195 | oddity3 = str(oddity3.group(1)).replace(' ', '') 196 | user_names.append(str(oddity3).title()) 197 | else: 198 | user_names.append(str(save_by).title()) 199 | 200 | except Exception: 201 | pass 202 | info('Finished Extracting MSDOC MetaData') 203 | return (user_names, software_list) 204 | 205 | #Modules takes in DOMAIN, PROX, USERAGENTS outputs user_names, software_list 206 | def doc_start(domain, USERAGENT_F, prox, q): 207 | ms_list_ext = ('.docx', '.pptx', '.xlsx', '.doc', '.xls', '.ppt') 208 | ms_file_list = [] 209 | pdf_file_list = [] 210 | info('Let The Hunt Begin') 211 | domain_r = domain.split('.') 212 | if not os.path.exists(os.path.expanduser('~/Bluto/doc/{}'.format(domain_r[0]))): 213 | os.makedirs(os.path.expanduser('~/Bluto/doc/{}'.format(domain_r[0]))) 214 | 215 | location = os.path.expanduser('~/Bluto/doc/{}/'.format(domain_r[0])) 216 | info('Data Folder Created ' + location) 217 | docs = os.path.expanduser(location) 218 | doc_list = doc_search(domain, USERAGENT_F, prox) 219 | 220 | if doc_list == []: 221 | q.put(None) 222 | return 223 | doc_list = set(sorted(doc_list)) 224 | download_list = action_download(doc_list, docs) 225 | download_count = len(download_list) 226 | 227 | for root, dirs, files in os.walk(docs): 228 | for filename in files: 229 | if str(filename).endswith(ms_list_ext): 230 | ms_file_list.append(os.path.join(root, filename)) 231 | if str(filename).endswith('.pdf'): 232 | pdf_file_list.append(os.path.join(root, filename)) 233 | 234 | if ms_file_list and pdf_file_list: 235 | user_names_ms, software_list_ms = ms_doc(ms_file_list) 236 | user_names_pdf, software_list_pdf = pdf_read(pdf_file_list) 237 | user_names_t = user_names_ms + user_names_pdf 238 | software_list_t = software_list_ms + software_list_pdf 239 | 240 | elif ms_file_list: 241 | user_names_ms, software_list_ms = ms_doc(ms_file_list) 242 | user_names_t = user_names_ms 243 | software_list_t = software_list_ms 244 | 245 | elif pdf_file_list: 246 | user_names_pdf, software_list_pdf = pdf_read(pdf_file_list) 247 | user_names_t = user_names_pdf 248 | software_list_t = software_list_pdf 249 | else: 250 | user_names_t = [] 251 | software_list_t = [] 252 | 253 | if user_names_t and software_list_t: 254 | user_names = sorted(set(user_names_t)) 255 | software_list = sorted(set(software_list_t)) 256 | info('The Hunt Ended') 257 | q.put((user_names, software_list, download_count, download_list)) 258 | 259 | elif software_list_t: 260 | software_list = sorted(set(software_list_t)) 261 | user_names = [] 262 | info('The Hunt Ended') 263 | q.put((user_names, software_list, download_count, download_list)) 264 | 265 | elif user_names_t: 266 | user_names = sorted(set(user_names_t)) 267 | software_list = [] 268 | info('The Hunt Ended') 269 | q.put((user_names, software_list, download_count, download_list)) 270 | elif (user_names_t and software_list) is None: 271 | q.put(None) 272 | -------------------------------------------------------------------------------- /Bluto/modules/general.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | from termcolor import colored 5 | import pythonwhois 6 | import traceback 7 | import requests 8 | import datetime 9 | import re 10 | import sys 11 | import random 12 | import socket 13 | import dns.resolver 14 | import dns.query 15 | import dns.zone 16 | import traceback 17 | import os 18 | from bluto_logging import info, INFO_LOG_FILE 19 | 20 | 21 | default_s = False 22 | 23 | def get_size(dir_location): 24 | start_path = dir_location 25 | total_size = 0 26 | for dirpath, dirnames, filenames in os.walk(start_path): 27 | for f in filenames: 28 | fp = os.path.join(dirpath, f) 29 | total_size += os.path.getsize(fp) 30 | total_size = total_size / 1024.0 31 | total_size = total_size / 1024.0 32 | return total_size 33 | 34 | 35 | def action_whois(domain): 36 | try: 37 | whois_things = pythonwhois.get_whois(domain) 38 | try: 39 | company = whois_things['contacts']['registrant']['name'] 40 | except Exception: 41 | print '\nThere seems to be no Registrar for this domain.' 42 | company = domain 43 | 44 | splitup = domain.lower().split('.')[0] 45 | patern = re.compile('|'.join(splitup)) 46 | while True: 47 | if patern.search(splitup): 48 | company = splitup 49 | info('Whois Results Are Good ' + company) 50 | print '\nThe Whois Results Look Promising: ' + colored('{}','green').format(company) 51 | accept = raw_input(colored('\nIs The Search Term sufficient?: ','green')).lower() 52 | if accept in ('y', 'yes'): 53 | company = company 54 | break 55 | elif accept in ('n', 'no'): 56 | temp_company = raw_input(colored('\nRegistered Company Name: ','green')) 57 | if temp_company == '': 58 | info('User Supplied Blank Company') 59 | company = domain 60 | break 61 | else: 62 | info('User Supplied Company ' + company) 63 | company = temp_company 64 | break 65 | else: 66 | print '\nThe Options Are yes|no Or y|no Not {}'.format(accept) 67 | 68 | else: 69 | info('Whois Results Not Good ' + company) 70 | print colored("\n\tThe Whois Results Don't Look Very Promissing: '{}'","red") .format(company) 71 | print'\nPlease Supply The Company Name\n\n\tThis Will Be Used To Query LinkedIn' 72 | temp_company = raw_input(colored('\nRegistered Company Name: ','green')) 73 | if temp_company == '': 74 | info('User Supplied Blank Company') 75 | company = domain 76 | break 77 | else: 78 | info('User Supplied Company ' + company) 79 | company = temp_company 80 | break 81 | 82 | except pythonwhois.shared.WhoisException: 83 | pass 84 | except socket.error: 85 | pass 86 | except KeyError: 87 | pass 88 | except pythonwhois.net.socket.errno.ETIMEDOUT: 89 | print colored('\nWhoisError: You may be behind a proxy or firewall preventing whois lookups. Please supply the registered company name, if left blank the domain name ' + '"' + domain + '"' +' will be used for the Linkedin search. The results may not be as accurate.','red') 90 | temp_company = raw_input(colored('\nRegistered Company Name: ','green')) 91 | if temp_company == '': 92 | company = domain 93 | else: 94 | company = temp_company 95 | except Exception: 96 | info('An Unhandled Exception Has Occured, Please Check The Log For Details' + INFO_LOG_FILE) 97 | if 'company' not in locals(): 98 | print 'There is no Whois data for this domain.\n\nPlease supply a company name.' 99 | while True: 100 | temp_company = raw_input(colored('\nRegistered Company Name: ','green')) 101 | if temp_company == '': 102 | info('User Supplied Blank Company') 103 | company = domain 104 | break 105 | else: 106 | company = temp_company 107 | info('User Supplied Company ' + company) 108 | break 109 | 110 | return company 111 | 112 | def action_country_id(countries_file, prox): 113 | 114 | def errorcheck(r): 115 | if 'success' in r.json(): 116 | key_change = True 117 | else: 118 | key_change = False 119 | return key_change 120 | 121 | info('Identifying Country') 122 | userCountry = '' 123 | userServer = '' 124 | userIP = '' 125 | userID = False 126 | o = 0 127 | tcountries_dic = {} 128 | country_list = [] 129 | 130 | with open(countries_file) as fin: 131 | for line in fin: 132 | key, value = line.strip().split(';') 133 | tcountries_dic.update({key: value}) 134 | 135 | countries_dic = dict((k.lower(), v.lower()) for k,v in tcountries_dic.iteritems()) 136 | 137 | for country, server in countries_dic.items(): 138 | country_list.append(country) 139 | 140 | country_list = [item.capitalize() for item in country_list] 141 | country_list.sort() 142 | 143 | while True: 144 | try: 145 | 146 | while True: 147 | api_keys = ['5751cce3503b56584e4b1267a7076904', 'dd763372274e9ae8aed34a55a7a4b36a'] 148 | random.Random(500) 149 | key = random.choice(api_keys) 150 | if prox == True: 151 | proxy = {'http' : 'http://127.0.0.1:8080'} 152 | r = requests.get(r'http://api.ipstack.com/check?access_key={}'.format(key), proxies=proxy, verify=False) 153 | key_change = errorcheck(r) 154 | originCountry = r.json()['country_name'] 155 | 156 | else: 157 | r = requests.get(r'http://api.ipstack.com/check?access_key={}'.format(key), verify=False) 158 | key_change = errorcheck(r) 159 | 160 | if not key_change: 161 | break 162 | 163 | originCountry = r.json()['country_name'] 164 | 165 | except ValueError as e: 166 | if o == 0: 167 | print colored('\nUnable to connect to the CountryID, we will retry.', 'red') 168 | if o > 0: 169 | print '\nThis is {} of 3 attempts' .format(o) 170 | time.sleep(2) 171 | o += 1 172 | if o == 4: 173 | break 174 | continue 175 | break 176 | 177 | if o == 4: 178 | print colored('\nWe have been unable to connect to the CountryID service.\n','red') 179 | print '\nPlease let Bluto know what country you hale from.\n' 180 | print colored('Available Countries:\n', 'green') 181 | 182 | if len(country_list) % 2 != 0: 183 | country_list.append(" ") 184 | 185 | split = len(country_list)/2 186 | l1 = country_list[0:split] 187 | l2 = country_list[split:] 188 | 189 | for key, value in zip(l1,l2): 190 | print "{0:<20s} {1}".format(key, value) 191 | 192 | country_list = [item.lower() for item in country_list] 193 | 194 | while True: 195 | originCountry = raw_input('\nCountry: ').lower() 196 | if originCountry in country_list: 197 | break 198 | if originCountry == '': 199 | print '\nYou have not selected a country so the default server will be used' 200 | originCountry = 'United Kingdom'.lower() 201 | break 202 | else: 203 | print '\nCheck your spelling and try again' 204 | 205 | for country, server in countries_dic.items(): 206 | if country == originCountry: 207 | userCountry = country 208 | userServer = server 209 | userID = True 210 | 211 | else: 212 | 213 | for country, server in countries_dic.items(): 214 | if country == originCountry.lower(): 215 | userCountry = country 216 | userServer = server 217 | userID = True 218 | if userID == False: 219 | if default_s == True: 220 | userCountry = 'DEAFULT' 221 | pass 222 | else: 223 | print 'Bluto currently doesn\'t have your countries google server available.\nPlease navigate to "https://freegeoip.net/json/" and post an issue to "https://github.com/darryllane/Bluto/issues"\nincluding the country value as shown in the json output\nYou have been assigned to http://www.google.co.uk for now.' 224 | userServer = 'http://www.google.co.uk' 225 | userCountry = 'United Kingdom' 226 | 227 | print '\n\tSearching From: {0}\n\tGoogle Server: {1}\n' .format(userCountry.title(), userServer) 228 | info('Country Identified: {}'.format(userCountry)) 229 | return (userCountry, userServer) 230 | 231 | 232 | def action_bluto_use(countryID): 233 | now = datetime.datetime.now() 234 | try: 235 | link = "http://darryllane.co.uk/bluto/log_use.php" 236 | payload = {'country': countryID, 'Date': now} 237 | requests.post(link, data=payload) 238 | except Exception: 239 | info('An Unhandled Exception Has Occured, Please Check The Log For Details' + INFO_LOG_FILE) 240 | pass 241 | 242 | 243 | def check_dom(domain, myResolver): 244 | try: 245 | myAnswers = myResolver.query(domain, "NS") 246 | dom = str(myAnswers.canonical_name).strip('.') 247 | if dom: 248 | pass 249 | except dns.resolver.NoNameservers: 250 | print '\nError: \nDomain Not Valid, Check You Have Entered It Correctly\n' 251 | sys.exit() 252 | except dns.resolver.NXDOMAIN: 253 | print '\nError: \nDomain Not Valid, Check You Have Entered It Correctly\n' 254 | sys.exit() 255 | except dns.exception.Timeout: 256 | print '\nThe connection hit a timeout. Are you connected to the internet?\n' 257 | sys.exit() 258 | except Exception: 259 | info('An Unhandled Exception Has Occured, Please Check The Log For Details' + INFO_LOG_FILE) 260 | -------------------------------------------------------------------------------- /Bluto/modules/get_dns.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | import sys 6 | import traceback 7 | import socket 8 | import dns.resolver 9 | import random 10 | import string 11 | from bluto_logging import info, INFO_LOG_FILE 12 | from multiprocessing.dummy import Pool as ThreadPool 13 | from termcolor import colored 14 | 15 | targets = [] 16 | 17 | def set_resolver(timeout_value): 18 | myResolver = dns.resolver.Resolver() 19 | myResolver.timeout = timeout_value 20 | myResolver.lifetime = timeout_value 21 | myResolver.nameservers = ['8.8.8.8', '8.8.4.4'] 22 | 23 | return myResolver 24 | 25 | 26 | def get_dns_details(domain, myResolver): 27 | info('Gathering DNS Details') 28 | ns_list = [] 29 | zn_list =[] 30 | mx_list = [] 31 | try: 32 | print "\nName Server:\n" 33 | myAnswers = myResolver.query(domain, "NS") 34 | for data in myAnswers.rrset: 35 | data1 = str(data) 36 | data2 = (data1.rstrip('.')) 37 | addr = socket.gethostbyname(data2) 38 | ns_list.append(data2 + '\t' + addr) 39 | zn_list.append(data2) 40 | list(set(ns_list)) 41 | ns_list.sort() 42 | for i in ns_list: 43 | print colored(i, 'green') 44 | except dns.resolver.NoNameservers: 45 | info('\tNo Name Servers\nConfirm The Domain Name Is Correct.' + INFO_LOG_FILE, exc_info=True) 46 | sys.exit() 47 | except dns.resolver.NoAnswer: 48 | print "\tNo DNS Servers" 49 | except dns.resolver.NXDOMAIN: 50 | info("\tDomain Does Not Exist" + INFO_LOG_FILE, exc_info=True) 51 | sys.exit() 52 | except dns.resolver.Timeout: 53 | info('\tTimeouted\nConfirm The Domain Name Is Correct.' + INFO_LOG_FILE, exc_info=True) 54 | sys.exit() 55 | except Exception: 56 | info('An Unhandled Exception Has Occured, Please Check The Log For Details\n' + INFO_LOG_FILE, exc_info=True) 57 | 58 | try: 59 | print "\nMail Server:\n" 60 | myAnswers = myResolver.query(domain, "MX") 61 | for data in myAnswers: 62 | data1 = str(data) 63 | data2 = (data1.split(' ',1)[1].rstrip('.')) 64 | addr = socket.gethostbyname(data2) 65 | mx_list.append(data2 + '\t' + addr) 66 | list(set(mx_list)) 67 | mx_list.sort() 68 | for i in mx_list: 69 | print colored(i, 'green') 70 | except dns.resolver.NoAnswer: 71 | print "\tNo Mail Servers" 72 | except Exception: 73 | info('An Unhandled Exception Has Occured, Please Check The Log For Details' + INFO_LOG_FILE) 74 | 75 | info('Completed Gathering DNS Details') 76 | return zn_list 77 | 78 | 79 | def action_wild_cards(domain, myResolver): 80 | info('Checking Wild Cards') 81 | try: 82 | one = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(15)) 83 | myAnswers = myResolver.query(str(one) + '.' + str(domain)) 84 | 85 | except dns.resolver.NoNameservers: 86 | pass 87 | 88 | except dns.resolver.NoAnswer: 89 | pass 90 | 91 | except dns.resolver.NXDOMAIN: 92 | info('Wild Cards False') 93 | return False 94 | else: 95 | info('Wild Cards True') 96 | return True 97 | 98 | 99 | def action_brute(subdomain): 100 | global myResolverG 101 | try: 102 | myAnswers = myResolverG.query(subdomain) 103 | for data in myAnswers: 104 | targets.append(subdomain + ' ' + str(data)) 105 | 106 | except dns.resolver.NoNameservers: 107 | pass 108 | except dns.resolver.NXDOMAIN: 109 | pass 110 | except dns.resolver.NoAnswer: 111 | pass 112 | except dns.exception.SyntaxError: 113 | pass 114 | except dns.exception.Timeout: 115 | info('Timeout: {}'.format(subdomain)) 116 | pass 117 | except dns.resolver.Timeout: 118 | pass 119 | except Exception: 120 | info('An Unhandled Exception Has Occured, Please Check The Log For Details' + INFO_LOG_FILE) 121 | info(traceback.print_exc()) 122 | 123 | 124 | def action_brute_start(subs, myResolver): 125 | global myResolverG 126 | myResolverG = myResolver 127 | info('Bruting SubDomains') 128 | print '\nBrute Forcing Sub-Domains\n' 129 | pool = ThreadPool(8) 130 | pool.map(action_brute, subs) 131 | pool.close() 132 | info('Completed Bruting SubDomains') 133 | 134 | return targets 135 | 136 | 137 | def action_brute_wild(sub_list, domain, myResolver): 138 | info('Bruting Wild Card SubDomains') 139 | target_results = [] 140 | random_addrs = [] 141 | for i in range(0,10,1): 142 | one = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(15)) 143 | myAnswers = myResolver.query(str(one) + '.' + str(domain)) 144 | name = myAnswers.canonical_name 145 | random_addr = socket.gethostbyname(str(name)) 146 | random_addrs.append(random_addr) 147 | random_addrs = sorted(set(random_addrs)) 148 | for host in sub_list: 149 | try: 150 | host_host, host_addr = host.split(' ') 151 | if host_addr in random_addrs: 152 | pass 153 | else: 154 | target_results.append(host) 155 | except dns.resolver.NoNameservers: 156 | pass 157 | except dns.resolver.NoAnswer: 158 | pass 159 | except dns.resolver.NXDOMAIN: 160 | pass 161 | except dns.name.EmptyLabel: 162 | pass 163 | except Exception: 164 | continue 165 | info('Completed Bruting Wild Card SubDomains') 166 | return target_results 167 | 168 | 169 | def action_zone_transfer(zn_list, domain): 170 | info('Attempting Zone Transfers') 171 | global clean_dump 172 | print "\nAttempting Zone Transfers" 173 | zn_list.sort() 174 | vuln = True 175 | vulnerable_listT = [] 176 | vulnerable_listF = [] 177 | dump_list = [] 178 | for ns in zn_list: 179 | try: 180 | z = dns.zone.from_xfr(dns.query.xfr(ns, domain, timeout=3, lifetime=5)) 181 | names = z.nodes.keys() 182 | names.sort() 183 | if vuln == True: 184 | info('Vuln: {}'.format(ns)) 185 | vulnerable_listT.append(ns) 186 | 187 | except Exception as e: 188 | error = str(e) 189 | if error == 'Errno -2] Name or service not known': 190 | pass 191 | if error == "[Errno 54] Connection reset by peer" or "No answer or RRset not for qname": 192 | info('Not Vuln: {}'.format(ns)) 193 | vuln = False 194 | vulnerable_listF.append(ns) 195 | else: 196 | info('An Unhandled Exception Has Occured, Please Check The Log For Details\n' + INFO_LOG_FILE, exc_info=True) 197 | 198 | 199 | if vulnerable_listF: 200 | print "\nNot Vulnerable:\n" 201 | for ns in vulnerable_listF: 202 | print colored(ns, 'green') 203 | 204 | if vulnerable_listT: 205 | info('Vulnerable To Zone Transfers') 206 | print "\nVulnerable:\n" 207 | for ns in vulnerable_listT: 208 | print colored(ns,'red'), colored("\t" + "TCP/53", 'red') 209 | 210 | 211 | z = dns.zone.from_xfr(dns.query.xfr(vulnerable_listT[0], domain, timeout=3, lifetime=5)) 212 | names = z.nodes.keys() 213 | names.sort() 214 | print "\nRaw Zone Dump\n" 215 | for n in names: 216 | data1 = "{}.{}" .format(n,domain) 217 | try: 218 | addr = socket.gethostbyname(data1) 219 | dump_list.append("{}.{} {}" .format(n, domain, addr)) 220 | 221 | except Exception as e: 222 | error = str(e) 223 | if error == "[Errno -5] No address associated with hostname": 224 | pass 225 | if error == 'Errno -2] Name or service not known': 226 | pass 227 | else: 228 | info('An Unhandled Exception Has Occured, Please Check The Log For Details\n' + INFO_LOG_FILE, exc_info=True) 229 | 230 | print z[n].to_text(n) 231 | 232 | info('Completed Attempting Zone Transfers') 233 | clean_dump = sorted(set(dump_list)) 234 | return ((vulnerable_listT, clean_dump)) 235 | -------------------------------------------------------------------------------- /Bluto/modules/get_file.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | import traceback 5 | import sys 6 | import random 7 | from termcolor import colored 8 | from bluto_logging import info, INFO_LOG_FILE 9 | 10 | def get_user_agents(useragent_f): 11 | info('Gathering UserAgents') 12 | uas = [] 13 | with open(useragent_f, 'rb') as uaf: 14 | for ua in uaf.readlines(): 15 | if ua: 16 | uas.append(ua.strip()[1:-1-1]) 17 | random.shuffle(uas) 18 | info('Completed Gathering UserAgents') 19 | return uas 20 | 21 | 22 | def get_subs(filename, domain): 23 | info('Gathering SubDomains') 24 | full_list = [] 25 | try: 26 | subs = [line.rstrip('\n') for line in open(filename)] 27 | for sub in subs: 28 | full_list.append(str(sub.lower() + "." + domain)) 29 | except Exception: 30 | info('An Unhandled Exception Has Occured, Please Check The Log For Details' + INFO_LOG_FILE) 31 | sys.exit() 32 | 33 | info('Completed Gathering SubDomains') 34 | return full_list 35 | 36 | def get_sub_interest(filename, domain): 37 | info('Gathering SubDomains Of Interest') 38 | full_list = [] 39 | try: 40 | subs = [line.rstrip('\n') for line in open(filename)] 41 | for sub in subs: 42 | full_list.append(str(sub.lower() + "." + domain)) 43 | 44 | except Exception: 45 | info('An Unhandled Exception Has Occured, Please Check The Log For Details' + INFO_LOG_FILE) 46 | sys.exit() 47 | 48 | info('Completed Gathering SubDomains Of Interest') 49 | return full_list 50 | 51 | 52 | def get_line_count(filename): 53 | info('Gathering SubDomains Count') 54 | lines = 0 55 | for line in open(filename): 56 | lines += 1 57 | 58 | info('Completed Gathering SubDomains Count') 59 | return lines 60 | -------------------------------------------------------------------------------- /Bluto/modules/output.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | from termcolor import colored 5 | import traceback 6 | import collections 7 | import datetime 8 | import webbrowser 9 | import shutil 10 | import os 11 | from search import action_pwned 12 | from bluto_logging import info, INFO_LOG_FILE, LOG_DIR 13 | 14 | 15 | def action_output_vuln_zone(google_results, bing_results, linkedin_results, time_spent_email, time_spent_total, clean_dump, sub_intrest, domain, report_location, company, data_mine): 16 | info('Output action_output_vuln_zone: Start') 17 | linkedin_evidence_results = [] 18 | email_evidence_results = [] 19 | email_results = [] 20 | email_seen = [] 21 | url_seen = [] 22 | person_seen = [] 23 | final_emails = [] 24 | 25 | for email, url in google_results: 26 | try: 27 | e1, e2 = email.split(',') 28 | if url not in email_seen: 29 | email_seen.append(url) 30 | email_evidence_results.append((str(e2).replace(' ',''),url)) 31 | email_evidence_results.append((str(e1).replace(' ',''),url)) 32 | email_results.append((str(e2).replace(' ',''))) 33 | email_results.append((str(e1).replace(' ',''))) 34 | 35 | except ValueError: 36 | if url not in email_seen: 37 | email_seen.append(url) 38 | email_evidence_results.append((str(email).replace(' ',''),url)) 39 | email_results.append(str(email).replace(' ','')) 40 | 41 | for e, u in bing_results: 42 | email_results.append(e) 43 | if u not in url_seen: 44 | email_evidence_results.append((e, u)) 45 | 46 | for url, person, description in linkedin_results: 47 | if person not in person_seen: 48 | person_seen.append(person) 49 | linkedin_evidence_results.append((url, person, description)) 50 | 51 | linkedin_evidence_results.sort(key=lambda tup: tup[1]) 52 | sorted_email = set(sorted(email_results)) 53 | for email in sorted_email: 54 | if email == '[]': 55 | pass 56 | elif email == '@' + domain: 57 | pass 58 | else: 59 | final_emails.append(email) 60 | email_count = len(final_emails) 61 | staff_count = len(person_seen) 62 | f_emails = sorted(final_emails) 63 | pwned_results = action_pwned(f_emails) 64 | c_accounts = len(pwned_results) 65 | 66 | print '\n\nEmail Addresses:\n' 67 | write_html(email_evidence_results, linkedin_evidence_results, pwned_results, report_location, company, data_mine) 68 | if f_emails: 69 | for email in f_emails: 70 | 71 | print str(email).replace("u'","").replace("'","").replace('[','').replace(']','') 72 | else: 73 | print '\tNo Data To Be Found' 74 | 75 | print '\nCompromised Accounts:\n' 76 | if pwned_results: 77 | sorted_pwned = sorted(pwned_results) 78 | for account in sorted_pwned: 79 | print 'Account: \t{}'.format(account[0]) 80 | print 'Domain: \t{}'.format(account[1]) 81 | print 'Date: \t{}\n'.format(account[3]) 82 | else: 83 | print '\tNo Data To Be Found' 84 | 85 | print '\nLinkedIn Results:\n' 86 | 87 | sorted_person = sorted(person_seen) 88 | if sorted_person: 89 | for person in sorted_person: 90 | print person 91 | else: 92 | print '\tNo Data To Be Found' 93 | 94 | user_names = None 95 | if data_mine is not None: 96 | user_names = data_mine[0] 97 | software_list = data_mine[1] 98 | download_count = data_mine[2] 99 | download_list = data_mine[3] 100 | username_count = len(user_names) 101 | software_count = len(software_list) 102 | 103 | print '\nData Found In Document MetaData' 104 | print '\nPotential Usernames:\n' 105 | if user_names: 106 | for user in user_names: 107 | print '\t' + colored(user, 'red') 108 | else: 109 | print '\tNo Data To Be Found' 110 | 111 | print '\nSoftware And Versions Found:\n' 112 | if software_list: 113 | for software in software_list: 114 | print '\t' + colored(software, 'red') 115 | else: 116 | print '\tNo Data To Be Found' 117 | else: 118 | user_names = [] 119 | software_list = [] 120 | download_count = 0 121 | username_count = len(user_names) 122 | software_count = len(software_list) 123 | 124 | target_dict = dict((x.split(' ') for x in clean_dump)) 125 | clean_target = collections.OrderedDict(sorted(target_dict.items())) 126 | print "\nProcessed Dump\n" 127 | 128 | bruted_count = len(clean_target) 129 | for item in clean_target: 130 | if item in sub_intrest: 131 | print colored(item, 'red'), colored("\t" + clean_target[item], 'red') 132 | else: 133 | print item, "\t" + target_dict[item] 134 | 135 | time_spent_email_f = str(datetime.timedelta(seconds=(time_spent_email))).split('.')[0] 136 | time_spent_total_f = str(datetime.timedelta(seconds=(time_spent_total))).split('.')[0] 137 | 138 | print '\nHosts Identified: {}' .format(str(bruted_count)) 139 | print 'Potential Emails Found: {}' .format(str(email_count)) 140 | print 'Potential Staff Members Found: {}' .format(str(staff_count)) 141 | print 'Compromised Accounts: {}' .format(str(c_accounts)) 142 | print 'Potential Usernames Found: {}'.format(username_count) 143 | print 'Potential Software Found: {}'.format(software_count) 144 | print 'Documents Downloaded: {}'.format(download_count) 145 | print "Email Enumeration:", time_spent_email_f 146 | print "Total Time:", time_spent_total_f 147 | 148 | info('Hosts Identified: {}' .format(str(bruted_count))) 149 | info("Total Time:" .format(str(time_spent_total_f))) 150 | info("Email Enumeration: {}" .format(str(time_spent_email_f))) 151 | info('Compromised Accounts: {}' .format(str(c_accounts))) 152 | info('Potential Usernames Found: {}'.format(username_count)) 153 | info('Potential Software Found: {}'.format(software_count)) 154 | info('Documents Downloaded: {}'.format(download_count)) 155 | info('Potential Staff Members Found: {}' .format(str(staff_count))) 156 | info('Potential Emails Found: {}' .format(str(email_count))) 157 | info('DNS Vuln Run completed') 158 | info('Output action_output_vuln_zone: Complete') 159 | 160 | domain_r = domain.split('.') 161 | docs = os.path.expanduser('~/Bluto/doc/{}/'.format(domain_r[0])) 162 | answers = ['no','n','y','yes'] 163 | while True: 164 | answer = raw_input("\nWould you like to keep all local data?\n(Local Logs, Downloded Documents, HTML Evidence Report)\n\nYes|No:").lower() 165 | if answer in answers: 166 | if answer == 'y' or answer == 'yes': 167 | domain 168 | print '\nThe documents are located here: {}'.format(docs) 169 | print 'The logs are located here: {}.'.format(LOG_DIR) 170 | print "\nAn evidence report has been written to {}\n".format(report_location) 171 | while True: 172 | answer = raw_input("Would you like to open this report now? ").lower() 173 | if answer in answers: 174 | if answer == 'y' or answer == 'yes': 175 | print '\nOpening {}' .format(report_location) 176 | webbrowser.open('file://' + str(report_location)) 177 | break 178 | else: 179 | break 180 | else: 181 | print 'Your answer needs to be either yes|y|no|n rather than, {}' .format(answer) 182 | break 183 | else: 184 | shutil.rmtree(docs) 185 | shutil.rmtree(LOG_DIR) 186 | os.remove(report_location) 187 | break 188 | else: 189 | print '\tYour answer needs to be either yes|y|no|n rather than, {}' .format(answer) 190 | 191 | 192 | def action_output_vuln_zone_hunter(google_results, bing_results, linkedin_results, time_spent_email, time_spent_total, clean_dump, sub_intrest, domain, emailHunter_results, args, report_location, company, data_mine): 193 | info('Output action_output_vuln_zone_hunter: Start') 194 | linkedin_evidence_results = [] 195 | email_evidence_results = [] 196 | email_results = [] 197 | email_seen = [] 198 | url_seen = [] 199 | person_seen = [] 200 | final_emails = [] 201 | 202 | if emailHunter_results is not None: 203 | for email in emailHunter_results: 204 | email_results.append(email[0]) 205 | email_evidence_results.append((email[0],email[1])) 206 | 207 | for email, url in google_results: 208 | try: 209 | e1, e2 = email.split(',') 210 | if url not in email_seen: 211 | email_seen.append(url) 212 | email_evidence_results.append((str(e2).replace(' ',''),url)) 213 | email_evidence_results.append((str(e1).replace(' ',''),url)) 214 | email_results.append((str(e2).replace(' ',''))) 215 | email_results.append((str(e1).replace(' ',''))) 216 | 217 | except ValueError: 218 | if url not in email_seen: 219 | email_seen.append(url) 220 | email_evidence_results.append((str(email).replace(' ',''),url)) 221 | email_results.append(str(email).replace(' ','')) 222 | 223 | for e, u in bing_results: 224 | email_results.append(e) 225 | if u not in url_seen: 226 | email_evidence_results.append((e, u)) 227 | 228 | for url, person, description in linkedin_results: 229 | if person not in person_seen: 230 | person_seen.append(person) 231 | linkedin_evidence_results.append((url, person, description)) 232 | 233 | linkedin_evidence_results.sort(key=lambda tup: tup[1]) 234 | sorted_email = set(sorted(email_results)) 235 | for email in sorted_email: 236 | if email == '[]': 237 | pass 238 | elif email == '@' + domain: 239 | pass 240 | else: 241 | final_emails.append(email) 242 | email_count = len(final_emails) 243 | staff_count = len(person_seen) 244 | f_emails = sorted(final_emails) 245 | pwned_results = action_pwned(f_emails) 246 | c_accounts = len(pwned_results) 247 | 248 | print '\n\nEmail Addresses:\n' 249 | write_html(email_evidence_results, linkedin_evidence_results, pwned_results, report_location, company, data_mine) 250 | if f_emails: 251 | for email in f_emails: 252 | print str(email).replace("u'","").replace("'","").replace('[','').replace(']','') 253 | else: 254 | print '\tNo Data To Be Found' 255 | 256 | print '\nCompromised Accounts:\n' 257 | if pwned_results: 258 | sorted_pwned = sorted(pwned_results) 259 | for account in sorted_pwned: 260 | print 'Account: \t{}'.format(account[0]) 261 | print 'Domain: \t{}'.format(account[1]) 262 | print 'Date: \t{}\n'.format(account[3]) 263 | else: 264 | print '\tNo Data To Be Found' 265 | 266 | print '\nLinkedIn Results:\n' 267 | 268 | sorted_person = sorted(person_seen) 269 | if sorted_person: 270 | for person in sorted_person: 271 | print person 272 | else: 273 | print '\tNo Data To Be Found' 274 | 275 | if data_mine is not None: 276 | user_names = data_mine[0] 277 | software_list = data_mine[1] 278 | download_count = data_mine[2] 279 | download_list = data_mine[3] 280 | username_count = len(user_names) 281 | software_count = len(software_list) 282 | 283 | print '\nData Found In Document MetaData' 284 | print '\nPotential Usernames:\n' 285 | if user_names: 286 | for user in user_names: 287 | print '\t' + colored(user, 'red') 288 | else: 289 | print '\tNo Data To Be Found' 290 | 291 | print '\nSoftware And Versions Found:\n' 292 | if software_list: 293 | for software in software_list: 294 | print '\t' + colored(software, 'red') 295 | else: 296 | print '\tNo Data To Be Found' 297 | else: 298 | user_names = [] 299 | software_list = [] 300 | download_count = 0 301 | username_count = len(user_names) 302 | software_count = len(software_list) 303 | 304 | target_dict = dict((x.split(' ') for x in clean_dump)) 305 | clean_target = collections.OrderedDict(sorted(target_dict.items())) 306 | 307 | print "\nProcessed Dump\n" 308 | bruted_count = len(clean_target) 309 | for item in clean_target: 310 | if item in sub_intrest: 311 | print colored(item, 'red'), colored("\t" + clean_target[item], 'red') 312 | else: 313 | print item, "\t" + target_dict[item] 314 | 315 | time_spent_email_f = str(datetime.timedelta(seconds=(time_spent_email))).split('.')[0] 316 | time_spent_total_f = str(datetime.timedelta(seconds=(time_spent_total))).split('.')[0] 317 | 318 | print '\nHosts Identified: {}' .format(str(bruted_count)) 319 | print 'Potential Emails Found: {}' .format(str(email_count)) 320 | print 'Potential Staff Members Found: {}' .format(str(staff_count)) 321 | print 'Compromised Accounts: {}' .format(str(c_accounts)) 322 | print 'Potential Usernames Found: {}'.format(username_count) 323 | print 'Potential Software Found: {}'.format(software_count) 324 | print 'Documents Downloaded: {}'.format(download_count) 325 | print "Email Enumeration:", time_spent_email_f 326 | print "Total Time:", time_spent_total_f 327 | 328 | info('Hosts Identified: {}' .format(str(bruted_count))) 329 | info("Total Time:" .format(str(time_spent_total_f))) 330 | info("Email Enumeration: {}" .format(str(time_spent_email_f))) 331 | info('Compromised Accounts: {}' .format(str(c_accounts))) 332 | info('Potential Usernames Found: {}'.format(username_count)) 333 | info('Potential Software Found: {}'.format(software_count)) 334 | info('Documents Downloaded: {}'.format(download_count)) 335 | info('Potential Staff Members Found: {}' .format(str(staff_count))) 336 | info('Potential Emails Found: {}' .format(str(email_count))) 337 | info('DNS Vuln Run completed') 338 | info('Output action_output_vuln_zone_hunter: Completed') 339 | 340 | domain_r = domain.split('.') 341 | docs = os.path.expanduser('~/Bluto/doc/{}/'.format(domain_r[0])) 342 | answers = ['no','n','y','yes'] 343 | while True: 344 | answer = raw_input("\nWould you like to keep all local data?\n(Local Logs, Downloded Documents, HTML Evidence Report)\n\nYes|No:").lower() 345 | if answer in answers: 346 | if answer == 'y' or answer == 'yes': 347 | domain 348 | print '\nThe documents are located here: {}'.format(docs) 349 | print 'The logs are located here: {}.'.format(LOG_DIR) 350 | print "\nAn evidence report has been written to {}\n".format(report_location) 351 | while True: 352 | answer = raw_input("Would you like to open this report now? ").lower() 353 | if answer in answers: 354 | if answer == 'y' or answer == 'yes': 355 | print '\nOpening {}' .format(report_location) 356 | webbrowser.open('file://' + str(report_location)) 357 | break 358 | else: 359 | break 360 | else: 361 | print 'Your answer needs to be either yes|y|no|n rather than, {}' .format(answer) 362 | break 363 | else: 364 | shutil.rmtree(docs) 365 | shutil.rmtree(LOG_DIR) 366 | os.remove(report_location) 367 | break 368 | else: 369 | print '\tYour answer needs to be either yes|y|no|n rather than, {}' .format(answer) 370 | 371 | 372 | def action_output_wild_false(brute_results_dict, sub_intrest, google_results, bing_true_results, linkedin_results, check_count, domain, time_spent_email, time_spent_brute, time_spent_total, report_location, company, data_mine): 373 | info('Output action_output_wild_false: Start') 374 | linkedin_evidence_results = [] 375 | email_evidence_results = [] 376 | email_results = [] 377 | email_seen = [] 378 | url_seen = [] 379 | person_seen = [] 380 | final_emails = [] 381 | 382 | for email, url in google_results: 383 | try: 384 | e1, e2 = email.split(',') 385 | if url not in email_seen: 386 | email_seen.append(url) 387 | email_evidence_results.append((str(e2).replace(' ',''),url)) 388 | email_evidence_results.append((str(e1).replace(' ',''),url)) 389 | email_results.append((str(e2).replace(' ',''))) 390 | email_results.append((str(e1).replace(' ',''))) 391 | 392 | except ValueError: 393 | if url not in email_seen: 394 | email_seen.append(url) 395 | email_evidence_results.append((str(email).replace(' ',''),url)) 396 | email_results.append(str(email).replace(' ','')) 397 | 398 | for e, u in bing_true_results: 399 | email_results.append(e) 400 | if u not in url_seen: 401 | email_evidence_results.append((e, u)) 402 | 403 | for url, person, description in linkedin_results: 404 | if person not in person_seen: 405 | person_seen.append(person) 406 | linkedin_evidence_results.append((url, person, description)) 407 | 408 | linkedin_evidence_results.sort(key=lambda tup: tup[1]) 409 | sorted_email = set(sorted(email_results)) 410 | for email in sorted_email: 411 | if email == '[]': 412 | pass 413 | elif email == '@' + domain: 414 | pass 415 | else: 416 | final_emails.append(email) 417 | email_count = len(final_emails) 418 | staff_count = len(person_seen) 419 | f_emails = sorted(final_emails) 420 | pwned_results = action_pwned(f_emails) 421 | c_accounts = len(pwned_results) 422 | 423 | print '\n\nEmail Addresses:\n' 424 | write_html(email_evidence_results, linkedin_evidence_results, pwned_results, report_location, company, data_mine) 425 | if f_emails: 426 | 427 | for email in f_emails: 428 | 429 | print str(email).replace("u'","").replace("'","").replace('[','').replace(']','') 430 | else: 431 | print '\tNo Data To Be Found' 432 | 433 | print '\nCompromised Accounts:\n' 434 | if pwned_results: 435 | sorted_pwned = sorted(pwned_results) 436 | for account in sorted_pwned: 437 | print 'Account: \t{}'.format(account[0]) 438 | print 'Domain: \t{}'.format(account[1]) 439 | print 'Date: \t{}\n'.format(account[3]) 440 | else: 441 | print '\tNo Data To Be Found' 442 | 443 | print '\nLinkedIn Results:\n' 444 | 445 | sorted_person = sorted(person_seen) 446 | if sorted_person: 447 | for person in sorted_person: 448 | print person 449 | else: 450 | print '\tNo Data To Be Found' 451 | 452 | if data_mine is not None: 453 | user_names = data_mine[0] 454 | software_list = data_mine[1] 455 | download_count = data_mine[2] 456 | download_list = data_mine[3] 457 | username_count = len(user_names) 458 | software_count = len(software_list) 459 | 460 | print '\nData Found In Document MetaData' 461 | print '\nPotential Usernames:\n' 462 | if user_names: 463 | for user in user_names: 464 | print '\t' + colored(user, 'red') 465 | else: 466 | print '\tNo Data To Be Found' 467 | 468 | print '\nSoftware And Versions Found:\n' 469 | if software_list: 470 | for software in software_list: 471 | print '\t' + colored(software, 'red') 472 | else: 473 | print '\tNo Data To Be Found' 474 | else: 475 | user_names = [] 476 | software_list = [] 477 | download_count = 0 478 | username_count = len(user_names) 479 | software_count = len(software_list) 480 | 481 | sorted_dict = collections.OrderedDict(sorted(brute_results_dict.items())) 482 | bruted_count = len(sorted_dict) 483 | print "\nBluto Results: \n" 484 | for item in sorted_dict: 485 | if item in sub_intrest: 486 | print colored(item + "\t", 'red'), colored(sorted_dict[item], 'red') 487 | else: 488 | print item + "\t",sorted_dict[item] 489 | 490 | 491 | time_spent_email_f = str(datetime.timedelta(seconds=(time_spent_email))).split('.')[0] 492 | time_spent_brute_f = str(datetime.timedelta(seconds=(time_spent_brute))).split('.')[0] 493 | time_spent_total_f = str(datetime.timedelta(seconds=(time_spent_total))).split('.')[0] 494 | 495 | print '\nHosts Identified: {}' .format(str(bruted_count)) 496 | print 'Potential Emails Found: {}' .format(str(email_count)) 497 | print 'Potential Staff Members Found: {}' .format(str(staff_count)) 498 | print 'Compromised Accounts: {}' .format(str(c_accounts)) 499 | print 'Potential Usernames Found: {}'.format(username_count) 500 | print 'Potential Software Found: {}'.format(software_count) 501 | print 'Documents Downloaded: {}'.format(download_count) 502 | print "Email Enumeration:", time_spent_email_f 503 | print "Requests executed:", str(check_count) + " in ", time_spent_brute_f 504 | print "Total Time:", time_spent_total_f 505 | 506 | info('Hosts Identified: {}' .format(str(bruted_count))) 507 | info("Email Enumeration: {}" .format(str(time_spent_email_f))) 508 | info('Compromised Accounts: {}' .format(str(c_accounts))) 509 | info('Potential Staff Members Found: {}' .format(str(staff_count))) 510 | info('Potential Emails Found: {}' .format(str(email_count))) 511 | info('Potential Usernames Found: {}'.format(username_count)) 512 | info('Potential Software Found: {}'.format(software_count)) 513 | info('Documents Downloaded: {}'.format(download_count)) 514 | info("Total Time:" .format(str(time_spent_total_f))) 515 | info('DNS No Wild Cards + Email Hunter Run completed') 516 | info('Output action_output_wild_false: Completed') 517 | 518 | domain_r = domain.split('.') 519 | docs = os.path.expanduser('~/Bluto/doc/{}/'.format(domain_r[0])) 520 | answers = ['no','n','y','yes'] 521 | while True: 522 | answer = raw_input("\nWould you like to keep all local data?\n(Local Logs, Downloded Documents, HTML Evidence Report)\n\nYes|No:").lower() 523 | if answer in answers: 524 | if answer == 'y' or answer == 'yes': 525 | domain 526 | print '\nThe documents are located here: {}'.format(docs) 527 | print 'The logs are located here: {}.'.format(LOG_DIR) 528 | print "\nAn evidence report has been written to {}\n".format(report_location) 529 | while True: 530 | answer = raw_input("Would you like to open this report now? ").lower() 531 | if answer in answers: 532 | if answer == 'y' or answer == 'yes': 533 | print '\nOpening {}' .format(report_location) 534 | webbrowser.open('file://' + str(report_location)) 535 | break 536 | else: 537 | break 538 | else: 539 | print 'Your answer needs to be either yes|y|no|n rather than, {}' .format(answer) 540 | break 541 | else: 542 | shutil.rmtree(docs) 543 | shutil.rmtree(LOG_DIR) 544 | os.remove(report_location) 545 | break 546 | else: 547 | print '\tYour answer needs to be either yes|y|no|n rather than, {}' .format(answer) 548 | 549 | 550 | def action_output_wild_false_hunter(brute_results_dict, sub_intrest, google_results, bing_true_results, linkedin_results, check_count, domain, time_spent_email, time_spent_brute, time_spent_total, emailHunter_results, args, report_location, company, data_mine): 551 | info('Output action_output_wild_false_hunter: Start') 552 | linkedin_evidence_results = [] 553 | email_evidence_results = [] 554 | email_results = [] 555 | email_seen = [] 556 | url_seen = [] 557 | person_seen = [] 558 | final_emails = [] 559 | 560 | if emailHunter_results is not None: 561 | for email in emailHunter_results: 562 | email_results.append(email[0]) 563 | email_evidence_results.append((email[0],email[1])) 564 | 565 | for email, url in google_results: 566 | try: 567 | e1, e2 = email.split(',') 568 | if url not in email_seen: 569 | email_seen.append(url) 570 | email_evidence_results.append((str(e2).replace(' ',''),url)) 571 | email_evidence_results.append((str(e1).replace(' ',''),url)) 572 | email_results.append((str(e2).replace(' ',''))) 573 | email_results.append((str(e1).replace(' ',''))) 574 | 575 | except ValueError: 576 | if url not in email_seen: 577 | email_seen.append(url) 578 | email_evidence_results.append((str(email).replace(' ',''),url)) 579 | email_results.append(str(email).replace(' ','')) 580 | 581 | for e, u in bing_true_results: 582 | email_results.append(e) 583 | if u not in url_seen: 584 | email_evidence_results.append((e, u)) 585 | 586 | for url, person, description in linkedin_results: 587 | if person not in person_seen: 588 | person_seen.append(person) 589 | linkedin_evidence_results.append((url, person, description)) 590 | 591 | linkedin_evidence_results.sort(key=lambda tup: tup[1]) 592 | sorted_email = set(sorted(email_results)) 593 | for email in sorted_email: 594 | if email == '[]': 595 | pass 596 | elif email == '@' + domain: 597 | pass 598 | else: 599 | final_emails.append(email) 600 | email_count = len(final_emails) 601 | staff_count = len(person_seen) 602 | f_emails = sorted(final_emails) 603 | pwned_results = action_pwned(f_emails) 604 | c_accounts = len(pwned_results) 605 | 606 | print '\n\nEmail Addresses:\n' 607 | write_html(email_evidence_results, linkedin_evidence_results, pwned_results, report_location, company, data_mine) 608 | if f_emails: 609 | 610 | for email in f_emails: 611 | 612 | print '\t' + str(email).replace("u'","").replace("'","").replace('[','').replace(']','') 613 | else: 614 | print '\tNo Data To Be Found' 615 | 616 | print '\nCompromised Accounts:\n' 617 | if pwned_results: 618 | sorted_pwned = sorted(pwned_results) 619 | for account in sorted_pwned: 620 | print 'Account: \t{}'.format(account[0]) 621 | print ' Domain: \t{}'.format(account[1]) 622 | print ' Date: \t{}\n'.format(account[3]) 623 | else: 624 | print '\tNo Data To Be Found' 625 | 626 | print '\nLinkedIn Results:\n' 627 | 628 | sorted_person = sorted(person_seen) 629 | if sorted_person: 630 | for person in sorted_person: 631 | print person 632 | else: 633 | print '\tNo Data To Be Found' 634 | 635 | if data_mine is not None: 636 | user_names = data_mine[0] 637 | software_list = data_mine[1] 638 | download_count = data_mine[2] 639 | download_list = data_mine[3] 640 | username_count = len(user_names) 641 | software_count = len(software_list) 642 | 643 | print '\nData Found In Document MetaData' 644 | print '\nPotential Usernames:\n' 645 | if user_names: 646 | for user in user_names: 647 | print '\t' + colored(user, 'red') 648 | else: 649 | print '\tNo Data To Be Found' 650 | 651 | print '\nSoftware And Versions Found:\n' 652 | if software_list: 653 | for software in software_list: 654 | print '\t' + colored(software, 'red') 655 | else: 656 | print '\tNo Data To Be Found' 657 | else: 658 | user_names = [] 659 | software_list = [] 660 | download_count = 0 661 | username_count = len(user_names) 662 | software_count = len(software_list) 663 | 664 | sorted_dict = collections.OrderedDict(sorted(brute_results_dict.items())) 665 | bruted_count = len(sorted_dict) 666 | print "\nBluto Results: \n" 667 | for item in sorted_dict: 668 | if item is not '*.' + domain: 669 | if item is not '@.' + domain: 670 | if item in sub_intrest: 671 | print colored(item + "\t", 'red'), colored(sorted_dict[item], 'red') 672 | else: 673 | print item + "\t",sorted_dict[item] 674 | 675 | time_spent_email_f = str(datetime.timedelta(seconds=(time_spent_email))).split('.')[0] 676 | time_spent_brute_f = str(datetime.timedelta(seconds=(time_spent_brute))).split('.')[0] 677 | time_spent_total_f = str(datetime.timedelta(seconds=(time_spent_total))).split('.')[0] 678 | 679 | print '\nHosts Identified: {}' .format(str(bruted_count)) 680 | print 'Potential Emails Found: {}' .format(str(email_count)) 681 | print 'Potential Staff Members Found: {}' .format(str(staff_count)) 682 | print 'Compromised Accounts: {}' .format(str(c_accounts)) 683 | print 'Potential Usernames Found: {}'.format(username_count) 684 | print 'Potential Software Found: {}'.format(software_count) 685 | print 'Documents Downloaded: {}'.format(download_count) 686 | print "Email Enumeration:", time_spent_email_f 687 | print "Requests executed:", str(check_count) + " in ", time_spent_brute_f 688 | print "Total Time:", time_spent_total_f 689 | 690 | info('Hosts Identified: {}' .format(str(bruted_count))) 691 | info("Email Enumeration: {}" .format(str(time_spent_email_f))) 692 | info('Compromised Accounts: {}' .format(str(c_accounts))) 693 | info('Potential Staff Members Found: {}' .format(str(staff_count))) 694 | info('Potential Emails Found: {}' .format(str(email_count))) 695 | info("Total Time:" .format(str(time_spent_total_f))) 696 | info('Documents Downloaded: {}'.format(download_count)) 697 | info('DNS No Wild Cards + Email Hunter Run completed') 698 | info('Output action_output_wild_false_hunter: Completed') 699 | 700 | domain_r = domain.split('.') 701 | docs = os.path.expanduser('~/Bluto/doc/{}/'.format(domain_r[0])) 702 | answers = ['no','n','y','yes'] 703 | while True: 704 | print colored("\nWould you like to keep all local data?\n(Local Logs, Downloded Documents, HTML Evidence Report)\n\nYes|No:", "red") 705 | answer = raw_input("").lower() 706 | if answer in answers: 707 | if answer == 'y' or answer == 'yes': 708 | domain 709 | print '\nThe documents are located here: {}'.format(docs) 710 | print 'The logs are located here: {}.'.format(LOG_DIR) 711 | print "\nAn evidence report has been written to {}\n".format(report_location) 712 | while True: 713 | answer = raw_input("Would you like to open this report now? ").lower() 714 | if answer in answers: 715 | if answer == 'y' or answer == 'yes': 716 | print '\nOpening {}' .format(report_location) 717 | webbrowser.open('file://' + str(report_location)) 718 | break 719 | else: 720 | break 721 | else: 722 | print 'Your answer needs to be either yes|y|no|n rather than, {}' .format(answer) 723 | break 724 | else: 725 | shutil.rmtree(docs) 726 | shutil.rmtree(LOG_DIR) 727 | os.remove(report_location) 728 | break 729 | else: 730 | print '\tYour answer needs to be either yes|y|no|n rather than, {}' .format(answer) 731 | 732 | 733 | def write_html(email_evidence_results, linkedin_evidence_results, pwned_results, report_location, company, data_mine): 734 | info('Started HTML Report') 735 | if data_mine is not None: 736 | user_names = data_mine[0] 737 | software_list = data_mine[1] 738 | download_count = data_mine[2] 739 | download_list = data_mine[3] 740 | username_count = len(user_names) 741 | software_count = len(software_list) 742 | header = ''' 743 | 744 | 745 | 746 | 778 | 779 | 780 | 781 |
782 |

Bluto Evidence Report

783 |

{a}

784 |
785 | '''.format(a=company) 786 | footer = ''' 787 | 788 |
789 |

Bluto

790 |

Author: Darryl Lane

791 |

Twitter: @darryllane101

792 |
793 | 794 | 795 | ''' 796 | 797 | emailDescription =''' 798 | 799 |

Email Evidence:

800 | 801 |
802 |

803 | Email evidence includes the email address and the location it was found, this allows for potential remediation. 804 | If corporate emails are to be utilised in the public domain, it is recommended that they are generic in nature and are not able to 805 | authenticate to any public corporate services such as VPN, or similare remote control services. 806 | 807 | This data can also be used in further attack vectors such as potential targets for Social Engineering and Phishing attacks. 808 |

809 |
810 | 811 | ''' 812 | metaDescription =''' 813 | 814 |

MetaData Evidence:

815 | 816 |
817 |

818 | Various techniques were used to gather potentially useful information on the scoped domain. The consultant 819 | identified multiple documents available for download from the scoped domains website/s. These documents could hold potentially 820 | sensitive data such as usernames, email addresses, folder structures, printers, operating system version information and 821 | software version information. This information can prove to be very useful to an attacker when targeting various vectors 822 | such as Social Engineering, password attacks and to expose further attack vectors. 823 | 824 | It is recommended that all document metadata is sanitised before being published into the public domain. 825 |

826 |
827 | 828 | ''' 829 | 830 | linkedinDescription =''' 831 | 832 |

LinkedIn Evidence:

833 | 834 |
835 |

836 | Staff names, job roles and associations can be gathered from social media sites such as LinkedIn. This information can be used 837 | to attempt futher information gathering via vectors such as Social Engineering techniques, phone attacks, and phishing attacks. This data can also be used to try determine more 838 | information such as potential email addresses. 839 |

840 |
841 | 842 | ''' 843 | 844 | compromisedDescription =''' 845 | 846 |

Compromised Account Evidence:

847 | 848 |
849 |

850 | This data was made publicly available due to a breach, this means that these account passwords and any portals that are utilised by these accounts 851 | could be compromised. It is recommedned that all account passwords are modified and made to adhere to company policy. 852 |

853 |
854 | 855 | ''' 856 | 857 | try: 858 | with open(report_location, 'w') as myFile: 859 | myFile.write(header) 860 | myFile.write('
') 861 | if email_evidence_results: 862 | myFile.write(emailDescription) 863 | myFile.write('') 864 | myFile.write('') 865 | myFile.write('') 866 | myFile.write('') 867 | myFile.write('') 868 | for email, url in email_evidence_results: 869 | myFile.write('') 870 | myFile.write(''.format(email)) 871 | myFile.write(''.format(url)) 872 | myFile.write('') 873 | myFile.write('
Email AddressURL Address
{}{}
') 874 | if linkedin_evidence_results: 875 | myFile.write(linkedinDescription) 876 | if linkedin_evidence_results: 877 | for url, person, clean in linkedin_evidence_results: 878 | myFile.write('') 879 | myFile.write('

'.format(person)) 880 | myFile.write('') 881 | myFile.write(''.format(clean)) 882 | myFile.write('') 883 | myFile.write(''.format(url)) 884 | myFile.write('

') 885 | myFile.write('
Person: {}
Role: {}
Url: {}
') 886 | if pwned_results: 887 | myFile.write(compromisedDescription) 888 | myFile.write('') 889 | if pwned_results: 890 | for result in pwned_results: 891 | myFile.write('

'.format(result[0])) 892 | myFile.write('') 893 | myFile.write(''.format(result[1])) 894 | myFile.write('') 895 | myFile.write(''.format(result[2])) 896 | myFile.write('') 897 | myFile.write(''.format(result[3])) 898 | myFile.write('') 899 | myFile.write(''.format(result[4])) 900 | myFile.write('') 901 | myFile.write(''.format(result[5])) 902 | myFile.write('

') 903 | myFile.write('
Email: {}
Domain: {}
Data: {}
Compromise Date: {}
Date Added: {}
Description:

{}

') 904 | if data_mine: 905 | myFile.write(metaDescription) 906 | myFile.write('') 907 | if data_mine: 908 | myFile.write('') 909 | if software_count: 910 | myFile.write('') 911 | if username_count: 912 | myFile.write('') 913 | if download_count: 914 | myFile.write('') 915 | myFile.write('') 916 | myFile.write('') 917 | if software_count: 918 | myFile.write(''.format(software_count)) 919 | if username_count: 920 | myFile.write(''.format(username_count)) 921 | if download_count: 922 | myFile.write(''.format(download_count)) 923 | myFile.write('') 924 | myFile.write('
Software CountUsername CountDownload Count
{}{}{}
') 925 | myFile.write('') 926 | myFile.write('
') 927 | if user_names: 928 | myFile.write('') 929 | myFile.write('') 930 | myFile.write('') 931 | for username in user_names: 932 | myFile.write('') 933 | myFile.write(''.format(username)) 934 | myFile.write('') 935 | myFile.write('
Usernames
{}
') 936 | myFile.write('') 937 | myFile.write('
') 938 | if software_list: 939 | myFile.write('') 940 | myFile.write('') 941 | myFile.write('') 942 | for software in software_list: 943 | myFile.write('') 944 | myFile.write(''.format(software)) 945 | myFile.write('') 946 | myFile.write('
Software
{}
') 947 | myFile.write('') 948 | if download_list: 949 | myFile.write('') 950 | myFile.write('') 951 | myFile.write('') 952 | for doc in download_list: 953 | myFile.write('') 954 | myFile.write(''.format(doc)) 955 | myFile.write('') 956 | myFile.write('
Document
{}
') 957 | myFile.write('
') 958 | myFile.write(footer) 959 | myFile.write('') 960 | myFile.write('') 961 | myFile.close() 962 | info('Completed HTML Report') 963 | except IOError,e: 964 | info('IOError', exc_info=True) 965 | except Exception: 966 | info('An Unhandled Exception Occured', exc_info=True) 967 | -------------------------------------------------------------------------------- /Bluto/modules/search.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | import dns.resolver 5 | import unicodedata 6 | import traceback 7 | import sys 8 | import re 9 | import requests 10 | import random 11 | import time 12 | import urllib2 13 | import json 14 | from termcolor import colored 15 | from bs4 import BeautifulSoup 16 | from bluto_logging import info, INFO_LOG_FILE 17 | 18 | requests.packages.urllib3.disable_warnings() 19 | 20 | def action_google(domain, userCountry, userServer, q, user_agents, prox): 21 | info('Google Search Started') 22 | uas = user_agents 23 | searchfor = '@' + '"' + domain + '"' 24 | entries_tuples = [] 25 | seen = set() 26 | results = [] 27 | for start in range(1,10,1): 28 | ua = random.choice(uas) 29 | try: 30 | if prox == True: 31 | proxy = {'http' : 'http://127.0.0.1:8080'} 32 | else: 33 | pass 34 | headers = {"User-Agent" : ua, 35 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 36 | 'Accept-Language': 'en-US,en;q=0.5', 37 | 'Accept-Encoding': 'gzip, deflate', 38 | 'Referer': 'https://www.google.com'} 39 | payload = { 'nord':'1', 'q': searchfor, 'start': start*10} 40 | 41 | link = '{0}/search?num=200' .format(userServer) 42 | if prox == True: 43 | response = requests.get(link, headers=headers, params=payload, proxies=proxy, verify=False) 44 | else: 45 | response = requests.get(link, headers=headers, params=payload, verify=False) 46 | 47 | response.raise_for_status() 48 | response.text.encode('ascii', 'ignore').decode('ascii') 49 | soup = BeautifulSoup(response.text, "lxml") 50 | 51 | for div in soup.select("div.g"): 52 | 53 | for div in soup.select("div.g"): 54 | 55 | email_temp = div.find("span", class_="st") 56 | clean = re.sub('', '', email_temp.text) 57 | clean = re.sub('', '', email_temp.text) 58 | match = re.findall('[a-zA-Z0-9.]*' + '@' + domain, clean) 59 | try: 60 | if match: 61 | if match is not '@' + domain: 62 | if match is not '@': 63 | url = div.find('cite').text 64 | email = str(match).replace("u'",'').replace('[','').replace(']','').replace("'",'') 65 | entries_tuples.append((email.lower(),str(url).replace("u'",'').replace("'",""))) 66 | except Exception, e: 67 | pass 68 | time.sleep(3) 69 | for urls in entries_tuples: 70 | if urls[1] not in seen: 71 | results.append(urls) 72 | seen.add(urls[1]) 73 | except requests.exceptions.HTTPError as e: 74 | if e.response.status_code == 503: 75 | info('Google is responding with a Captcha, other searches will continue') 76 | break 77 | except AttributeError as f: 78 | pass 79 | except Exception: 80 | info('An Unhandled Exception Has Occured, Please Check The Log For Details' + INFO_LOG_FILE) 81 | 82 | info('Google Search Completed') 83 | q.put(sorted(results)) 84 | 85 | 86 | #Takes [list[tuples]]email~url #Returns [list[tuples]]email_address, url_found, breach_domain, breach_data, breach_date, / 87 | #breach_added, breach_description 88 | def action_pwned(emails): 89 | info('Compromised Account Enumeration Search Started') 90 | pwend_data = [] 91 | seen = set() 92 | for email in emails: 93 | time.sleep(3) 94 | link = 'https://haveibeenpwned.com/api/v3/breachedaccount/{}?truncateResponse=false'.format(email) 95 | try: 96 | headers = {"User-Agent" : "BlutoDNS v2.4.16", 97 | 'hibp-api-key': 'db192f959742455f98106687df692c68'} 98 | 99 | response = requests.get(link, headers=headers, verify=False) 100 | json_data = response.json() 101 | if json_data: 102 | if email in seen: 103 | pass 104 | else: 105 | for item in json_data: 106 | breach_data = ' ' 107 | seen.add(email) 108 | email_address = email 109 | breach_domain = item['Domain'].encode('utf-8') 110 | data = item['DataClasses'] 111 | for value in data: 112 | breach_data = breach_data + value.encode('utf-8') + ', ' 113 | breach_data = breach_data.strip().strip(',')[:-1] 114 | breach_date = item['BreachDate'].encode('utf-8') 115 | breach_added = item['AddedDate'].encode('utf-8') 116 | breach_description = item['Description'].encode('utf-8') 117 | pwend_data.append((email_address, breach_domain, breach_data, breach_date, breach_added, breach_description)) 118 | 119 | except ValueError as e: 120 | pass 121 | except Exception: 122 | info('An Unhandled Exception Has Occured, Please Check The Log For Details\n' + INFO_LOG_FILE, exc_info=True) 123 | 124 | info('Compromised Account Enumeration Search Completed') 125 | return pwend_data 126 | 127 | 128 | #Takes domain[str], api[list], user_agents[list] #Returns email,url [list[tuples]] Queue[object], prox[str] 129 | def action_emailHunter(domain, api, user_agents, q, prox): 130 | info('Hunter Search Started') 131 | emails = [] 132 | uas = user_agents 133 | ua = random.choice(uas) 134 | link = 'https://api.emailhunter.co/v1/search?domain={0}&api_key={1}'.format(domain,api) 135 | 136 | if prox == True: 137 | proxy = {'http' : 'http://127.0.0.1:8080'} 138 | else: 139 | pass 140 | try: 141 | headers = {"User-Agent" : ua, 142 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 143 | 'Accept-Language': 'en-US,en;q=0.5', 144 | 'Accept-Encoding': 'gzip, deflate'} 145 | if prox == True: 146 | response = requests.get(link, headers=headers, proxies=proxy, verify=False) 147 | else: 148 | response = requests.get(link, headers=headers, verify=False) 149 | if response.status_code == 200: 150 | json_data = response.json() 151 | for value in json_data['emails']: 152 | for domain in value['sources']: 153 | url = str(domain['uri']).replace("u'","") 154 | email = str(value['value']).replace("u'","") 155 | emails.append((email,url)) 156 | elif response.status_code == 401: 157 | json_data = response.json() 158 | if json_data['message'] =='Too many calls for this period.': 159 | print colored("\tError:\tIt seems the Hunter API key being used has reached\n\t\tit's limit for this month.", 'red') 160 | print colored('\tAPI Key: {}\n'.format(api),'red') 161 | q.put(None) 162 | return None 163 | if json_data['message'] == 'Invalid or missing api key.': 164 | print colored("\tError:\tIt seems the Hunter API key being used is no longer valid,\nit was probably deleted.", 'red') 165 | print colored('\tAPI Key: {}\n'.format(api),'red') 166 | print colored('\tWhy don\'t you grab yourself a new one (they are free)','green') 167 | print colored('\thttps://hunter.io/api_keys','green') 168 | q.put(None) 169 | return None 170 | else: 171 | info('No Response From Hunter') 172 | q.put(None) 173 | except UnboundLocalError,e: 174 | print e 175 | except KeyError: 176 | pass 177 | except ValueError: 178 | info(traceback.print_exc()) 179 | pass 180 | except Exception: 181 | traceback.print_exc() 182 | info('An Unhandled Exception Has Occured, Please Check The Log For Details\n' + INFO_LOG_FILE, exc_info=True) 183 | 184 | info('Hunter Search Completed') 185 | q.put(sorted(emails)) 186 | 187 | 188 | def action_bing_true(domain, q, user_agents, prox): 189 | info('Bing Search Started') 190 | emails = [] 191 | uas = user_agents 192 | searchfor = '@' + '"' + domain + '"' 193 | for start in range(0,30): 194 | ua = random.choice(uas) 195 | if prox == True: 196 | proxy = {'http' : 'http://127.0.0.1:8080'} 197 | else: 198 | pass 199 | try: 200 | headers = {"Connection" : "close", 201 | "User-Agent" : ua, 202 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 203 | 'Accept-Language': 'en-US,en;q=0.5', 204 | 'Accept-Encoding': 'gzip, deflate'} 205 | payload = { 'q': searchfor, 'first': start} 206 | link = 'https://www.bing.com/search' 207 | if prox == True: 208 | response = requests.get(link, headers=headers, params=payload, proxies=proxy, verify=False) 209 | else: 210 | response = requests.get(link, headers=headers, params=payload, verify=False) 211 | reg_emails = re.compile('[a-zA-Z0-9.-]*' + '@' + '') 212 | temp = reg_emails.findall(response.text) 213 | time.sleep(1) 214 | for item in temp: 215 | clean = item.replace("", "") 216 | email.append(clean + domain) 217 | 218 | except Exception: 219 | continue 220 | info('Bing Search Completed') 221 | q.put(sorted(emails)) 222 | 223 | def doc_exalead(domain, user_agents, prox, q): 224 | document_list = [] 225 | uas = user_agents 226 | info('Exalead Document Search Started') 227 | for start in range(0,80,10): 228 | ua = random.choice(uas) 229 | link = 'http://www.exalead.com/search/web/results/?search_language=&q=(filetype:xls+OR+filetype:doc+OR++filetype:pdf+OR+filetype:ppt)+site:{}&search_language=&elements_per_page=10&start_index={}'.format(domain, start) 230 | if prox == True: 231 | proxy = {'http' : 'http://127.0.0.1:8080'} 232 | else: 233 | pass 234 | try: 235 | headers = {"Connection" : "close", 236 | "User-Agent" : ua, 237 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 238 | 'Accept-Language': 'en-US,en;q=0.5', 239 | 'Accept-Encoding': 'gzip, deflate'} 240 | if prox == True: 241 | response = requests.get(link, headers=headers, proxies=proxy, verify=False) 242 | else: 243 | response = requests.get(link, headers=headers, verify=False) 244 | soup = BeautifulSoup(response.text, "lxml") 245 | if soup.find('label', {'class': 'control-label', 'for': 'id_captcha'}): 246 | info("So you don't like spinach?") 247 | info("Captchas are preventing some document searches.") 248 | break 249 | for div in soup.findAll('li', {'class': 'media'}): 250 | document = div.find('a', href=True)['href'] 251 | document = urllib2.unquote(document) 252 | document_list.append(document) 253 | 254 | except Exception: 255 | info('An Unhandled Exception Has Occured, Please Check The Log For Details' + INFO_LOG_FILE) 256 | continue 257 | 258 | time.sleep(10) 259 | potential_docs = len(document_list) 260 | info('Exalead Document Search Finished') 261 | info('Potential Exalead Documents Found: {}'.format(potential_docs)) 262 | q.put(document_list) 263 | 264 | def doc_bing(domain, user_agents, prox, q): 265 | document_list = [] 266 | uas = user_agents 267 | info('Bing Document Search Started') 268 | for start in range(1,300,10): 269 | ua = random.choice(uas) 270 | if prox == True: 271 | proxy = {'http' : 'http://127.0.0.1:8080'} 272 | else: 273 | pass 274 | try: 275 | headers = {"Connection" : "close", 276 | "User-Agent" : ua, 277 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 278 | 'Accept-Language': 'en-US,en;q=0.5', 279 | 'Accept-Encoding': 'gzip, deflate'} 280 | payload = { 'q': 'filetype:(doc dot docx docm dotx dotm docb xls xlt xlm xlsx xlsm xltx xltm xlsb xla xlam xll xlw ppt pot pps pptx pptm potx potm ppam ppsx ppsm sldx sldm pub pdf) site:{}'.format(domain), 'first': start} 281 | link = 'http://www.bing.com/search' 282 | if prox == True: 283 | response = requests.get(link, headers=headers, proxies=proxy, params=payload, verify=False) 284 | else: 285 | response = requests.get(link, headers=headers, params=payload, verify=False) 286 | 287 | soup = BeautifulSoup(response.text, "lxml") 288 | 289 | divs = soup.findAll('li', {'class': 'b_algo'}) 290 | for div in divs: 291 | h2 = div.find('h2') 292 | document = h2.find('a', href=True)['href'] 293 | document = urllib2.unquote(document) 294 | document_list.append(document) 295 | except TypeError: 296 | pass 297 | except requests.models.ChunkedEncodingError: 298 | continue 299 | except Exception: 300 | traceback.print_exc() 301 | continue 302 | potential_docs = len(document_list) 303 | info('Bing Document Search Finished') 304 | q.put(document_list) 305 | 306 | def action_linkedin(domain, userCountry, q, company, user_agents, prox): 307 | info('LinkedIn Search Started') 308 | uas = user_agents 309 | entries_tuples = [] 310 | seen = set() 311 | results = [] 312 | who_error = False 313 | searchfor = 'site:linkedin.com/in ' + '"' + company + '"' 314 | ua = random.choice(uas) 315 | for start in range(1,50,1): 316 | if prox == True: 317 | proxy = {'http' : 'http://127.0.0.1:8080'} 318 | else: 319 | pass 320 | try: 321 | headers = {"Connection" : "close", 322 | "User-Agent" : ua, 323 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 324 | 'Accept-Language': 'en-US,en;q=0.5', 325 | 'Accept-Encoding': 'gzip, deflate'} 326 | payload = { 'q': searchfor, 'first': start} 327 | link = 'http://www.bing.com/search' 328 | if prox == True: 329 | response = requests.get(link, headers=headers, params=payload, proxies=proxy, verify=False) 330 | else: 331 | response = requests.get(link, headers=headers, params=payload, verify=False) 332 | 333 | response.text.encode('utf-8') 334 | soup = BeautifulSoup(response.text, "lxml") 335 | 336 | for div in soup.findAll('li', {'class': 'b_algo'}): 337 | title_temp = div.find('a').text 338 | url = div.find('cite').text.encode('utf-8') 339 | person = str((title_temp.split(' | ')[0])) 340 | description_temp = div.find('div', {'class': 'b_caption'}) 341 | description = description_temp.find('p').text.encode('utf-8').lstrip('View ').replace("’s","").replace("professional profile on LinkedIn. ... ","").replace(" professional profile on LinkedIn. LinkedIn is the world's largest business network, ...","").replace("’S","").replace("’","").replace("professional profile on LinkedIn.","").replace(person, '').lstrip(' ').lstrip('. ').replace("LinkedIn is the world's largest business network, helping professionals like discover ...","").replace("LinkedIn is the world's largest business network, helping professionals like discover inside ...","").replace("professional profile on ... • ","").replace("professional ... ","").replace("...","").lstrip('•').lstrip(' ') 342 | entries_tuples.append((url, person.title(), description)) 343 | 344 | except Exception: 345 | continue 346 | 347 | for urls in entries_tuples: 348 | if urls[1] not in seen: 349 | results.append(urls) 350 | seen.add(urls[1]) 351 | 352 | info('LinkedIn Search Completed') 353 | q.put(sorted(results)) 354 | 355 | 356 | def action_netcraft(domain, myResolver): 357 | info('NetCraft Search Started') 358 | netcraft_list = [] 359 | print "\nPassive Gatherings From NetCraft\n" 360 | try: 361 | link = "http://searchdns.netcraft.com/?restriction=site+contains&host=*.{}&lookup=wait..&position=limited" .format (domain) 362 | response = requests.get(link, verify=False) 363 | soup = BeautifulSoup(response.content, 'lxml') 364 | pattern = 'rel="nofollow">([a-z\.\-A-Z0-9]+)' 365 | sub_results = re.findall(pattern, response.content) 366 | except dns.exception.Timeout: 367 | pass 368 | except Exception: 369 | info('An Unhandled Exception Has Occured, Please Check The Log For Details\n' + INFO_LOG_FILE, exc_info=True) 370 | 371 | if sub_results: 372 | for item in sub_results: 373 | try: 374 | netcheck = myResolver.query(item + '.' + domain) 375 | for data in netcheck: 376 | netcraft_list.append(item + '.' + domain + ' ' + str(data)) 377 | print colored(item + '.' + domain, 'red') 378 | except dns.exception.Timeout: 379 | pass 380 | except dns.resolver.NXDOMAIN: 381 | pass 382 | except Exception: 383 | info('An Unhandled Exception Has Occured, Please Check The Log For Details\n' + INFO_LOG_FILE, exc_info=True) 384 | else: 385 | print '\tNo Results Found' 386 | 387 | info('NetCraft Completed') 388 | return netcraft_list 389 | -------------------------------------------------------------------------------- /Bluto/modules/update.py: -------------------------------------------------------------------------------- 1 | 2 | from bluto_logging import info 3 | import subprocess 4 | import re 5 | from termcolor import colored 6 | import sys 7 | 8 | def updateCheck(VERSION): 9 | command_check = (["pip list -o"]) 10 | process_check = subprocess.Popen(command_check, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT) 11 | output_check = process_check.communicate()[0] 12 | line = output_check.splitlines() 13 | for i in line: 14 | if 'bluto' in str(i).lower(): 15 | new_version = re.match('Bluto\s\(.*\)\s\-\sLatest\:\s(.*?)\s\[sdist\]', i).group(1) 16 | found = True 17 | else: 18 | found = False 19 | 20 | if found: 21 | info('Update Availble') 22 | print colored('\nUpdate Available!', 'red'), colored('{}'.format(new_version), 'green') 23 | print colored('Would you like to attempt to update?\n', 'green') 24 | while True: 25 | answer = raw_input('Y|N: ').lower() 26 | if answer in ('y', 'yes'): 27 | update() 28 | print '\n' 29 | break 30 | elif answer in ('n', 'no'): 31 | print '\n' 32 | break 33 | else: 34 | print '\nThe Options Are yes|no Or Y|N, Not {}'.format(answer) 35 | else: 36 | print colored('You are running the latest version:','green'), colored('{}\n'.format(VERSION),'blue') 37 | 38 | 39 | def update(): 40 | command_check = (["pip install bluto --upgrade"]) 41 | process_check = subprocess.Popen(command_check, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT) 42 | output_check = process_check.communicate()[0] 43 | lines = output_check.splitlines() 44 | info(lines) 45 | if 'Successfully installed' in lines[:-1]: 46 | print colored('\nUpdate Successfull!', 'green') 47 | sys.exit() 48 | else: 49 | print colored('\nUpdate Failed, Please Check The Logs For Details', 'red') 50 | 51 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.txt 2 | include *.md 3 | recursive-include Bluto/doc *.txt 4 | recursive-include Bluto/modules *.py 5 | recursive-exclude / *.DS_store 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **BLUTO** 2 | ----- 3 | **DNS Recon | Brute Forcer | DNS Zone Transfer | DNS Wild Card Checks | DNS Wild Card Brute Forcer | Email Enumeration | Staff Enumeration | Compromised Account Enumeration | MetaData Harvesting** 4 | 5 | >Author: Darryl Lane | Twitter: @darryllane101 6 | 7 | >https://github.com/darryllane/Bluto 8 | 9 | Like Bluto? 10 | ==== 11 | Give us a vote: https://n0where.net/dns-analysis-tool-bluto/ 12 | 13 | Bluto has gone through a large code base change and various feature additions have been added since its first day on the job. Now that RandomStorm has been consumed and no longer exists, I felt it time to move the repo to a new location. So from this git push onwards Bluto will live here. I hope you enjoy the new Bluto. 14 | 15 | 16 | The target domain is queried for MX and NS records. Sub-domains are passively gathered via NetCraft. The target domain NS records are each queried for potential Zone Transfers. If none of them gives up their spinach, Bluto will attempt to identify if SubDomain Wild Cards are being used. If they are not Bluto will brute force subdomains using parallel sub processing on the top 20000 of the 'The Alexa Top 1 Million subdomains' If Wild Cards are in place, Bluto will still Brute Force SubDomains but using a different technique which takes roughly 4 x longer. NetCraft results are then presented individually and are then compared to the brute force results, any duplications are removed and particularly interesting results are highlighted. 17 | 18 | Bluto now does email address enumeration based on the target domain, currently using Bing and Google search engines plus gathering data from the Email Hunter service and LinkedIn. https://haveibeenpwned.com/ is then used to identify if any email addresses have been compromised. Previously Bluto produced a 'Evidence Report' on the screen, this has now been moved off screen and into an HTML report. 19 | 20 | Search engine queries are configured in such a way to use a random `User Agent:` on each request and does a country look up to select the fastest Google server in relation to your egress address. Each request closes the connection in an attempt to further avoid captchas, however exsesive lookups will result in captchas (Bluto will warn you if any are identified). 21 | 22 | Bluto requires various other dependencies. So to make things as easy as possible, `pip` is used for the installation. This does mean you will need to have pip installed prior to attempting the Bluto install. 23 | 24 | Bluto now takes command line arguments at launch, the new options are as follows; 25 | 26 | -e This uses a very large subdomain list for bruting. 27 | -api You can supply your email hunter api key here to gather a considerably larger amount of email addresses. 28 | -d Used to specify the target domain on the commandline. 29 | -t Used to set a timeout value in seconds. Default is 10 30 | 31 | **Examples:** (feel free to use this EmailHunter API Key until it is removed) 32 | 33 | bluto -api 2b0ab19df982a783877a6b59b982fdba4b6c3669 34 | bluto -e 35 | bluto -api 2b0ab19df982a783877a6b59b982fdba4b6c3669 -e 36 | bluto -d example.com -api 2b0ab19df982a783877a6b59b982fdba4b6c3669 -e 37 | 38 | 39 | **Pip Install Instructions** 40 | 41 | Note: To test if pip is already installed execute. 42 | 43 | `pip -V` 44 | 45 | (1) Mac and Kali users can simply use the following command to download and install `pip`. 46 | 47 | `curl https://bootstrap.pypa.io/get-pip.py -o - | python` 48 | 49 | **Bluto Install Instructions** 50 | 51 | (1) Once `pip` has successfully downloaded and installed, we can install Bluto: 52 | 53 | `sudo pip install bluto` 54 | 55 | (2) You should now be able to execute 'bluto' from any working directory in any terminal. 56 | 57 | `bluto` 58 | 59 | **Upgrade Instructions** 60 | 61 | (1) The upgrade process is as simple as; 62 | 63 | `sudo pip install bluto --upgrade` 64 | 65 | 66 | **Install From Dev Branch** 67 | 68 | (1) To install from the latest development branch (maybe unstable); 69 | 70 | `sudo pip uninstall bluto` 71 | 72 | `sudo pip install git+git://github.com/darryllane/Bluto@dev` 73 | 74 | Change/Feature Requests 75 | ==== 76 | * ~~MetaData Scraping From Document Hunt On Target Domain~~ 77 | * ~~Target Domain Parsed As Argument~~ 78 | * Identification Of Web Portals 79 | * Active Document Hunting 80 | 81 | Changelog 82 | ==== 83 | * Version __2.4.7__ (__20/07/2018__): 84 | * GeoIP lookup refactor 85 | 86 | * Version __2.3.10__ (__13/01/2017__): 87 | * BugFixes 88 | 89 | * Version __2.3.6__ (__14/08/2016__): 90 | * BugFixes 91 | * Timeout value can be parsed as argument (-t 5) 92 | 93 | * Version __2.3.2__ (__02/08/2016__): 94 | * MetaData Scraping From Document Hunt On Target Domain 95 | * Target Domain Parsed As Argument 96 | 97 | * Version __2.0.1__ (__22/07/2016__): 98 | * Compromised Account Data Prensented In Terminal And HTML Report 99 | 100 | * Version __2.0.0__ (__19/07/2016__): 101 | * Pushed Live 2.0 102 | 103 | * Version __1.9.9__ (__09/07/2016__): 104 | * Email Hunter API Support Added. 105 | * Haveibeenpwned API Support Added. 106 | * HTML Evidence Report Added. 107 | * Modulated Code Base. 108 | * Local Error Logging. 109 | 110 | 111 | **Help Section** 112 | 113 | This section contains helpful snippets. 114 | 115 | Check version of openssl being used by python 116 | 117 | python 118 | import ssl 119 | ssl.OPENSSL_VERSION` 120 | 121 | Output 122 | 123 | >>> import ssl 124 | >>> ssl.OPENSSL_VERSION 125 | 'OpenSSL 1.0.2j 26 Sep 2016' 126 | >>> 127 | 128 | Please be aware that the current version of Bluto does not support Python 3. It is a python 2.7.x application. 129 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | setup( 4 | name='Bluto', 5 | version='2.4.17', 6 | author='Darryl lane', 7 | author_email='DarrylLane101@gmail.com', 8 | url='https://github.com/darryllane/Bluto', 9 | packages=['Bluto'], 10 | include_package_data=True, 11 | license='LICENSE.txt', 12 | description=''' 13 | DNS Recon | Brute Forcer | DNS Zone Transfer | DNS Wild Card Checks 14 | DNS Wild Card Brute Forcer | Email Enumeration | Staff Enumeration 15 | Compromised Account Checking''', 16 | long_description_content_type='text/markdown', 17 | long_description=open('README.md').read(), 18 | scripts=['Bluto/bluto'], 19 | install_requires=[ 20 | "docopt", 21 | "dnspython", 22 | "termcolor", 23 | "BeautifulSoup4", 24 | "requests[security]", 25 | "pythonwhois", 26 | "lxml", 27 | "oletools", 28 | "pdfminer==20140328" 29 | ], 30 | ) 31 | 32 | --------------------------------------------------------------------------------