Commit 9d029f30 by lucyoa

Fixing exception handling

parent e6179d98
...@@ -70,7 +70,7 @@ class Exploit(exploits.Exploit): ...@@ -70,7 +70,7 @@ class Exploit(exploits.Exploit):
def check(self): def check(self):
try: try:
conn = telnetlib.Telnet(self.target, self.port) conn = telnetlib.Telnet(self.target, self.port)
except Exception: if 'Grandstream' in conn.read_until("login:"):
return True
except:
return False return False
else:
return 'Grandstream' in conn.read_until("login:")
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