Commit a2ed3edc by Marcin Bury

Adding mute decorator to all exploits.

parent eeaf55c9
...@@ -7,6 +7,7 @@ from routersploit import ( ...@@ -7,6 +7,7 @@ from routersploit import (
print_status, print_status,
print_success, print_success,
print_error, print_error,
mute,
shell, shell,
) )
...@@ -89,6 +90,7 @@ class Exploit(exploits.Exploit): ...@@ -89,6 +90,7 @@ class Exploit(exploits.Exploit):
sock.close() sock.close()
return output return output
@mute
def check(self): def check(self):
NUM_CHECKS = 5 # we try 5 times because the exploit, tends to be unstable NUM_CHECKS = 5 # we try 5 times because the exploit, tends to be unstable
......
...@@ -13,6 +13,7 @@ from routersploit import ( ...@@ -13,6 +13,7 @@ from routersploit import (
print_success, print_success,
print_error, print_error,
print_status, print_status,
mute,
) )
...@@ -97,6 +98,7 @@ class Exploit(exploits.Exploit): ...@@ -97,6 +98,7 @@ class Exploit(exploits.Exploit):
finally: finally:
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, oldtty) termios.tcsetattr(sys.stdin, termios.TCSADRAIN, oldtty)
@mute
def check(self): def check(self):
client = paramiko.SSHClient() client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
......
...@@ -5,6 +5,7 @@ from routersploit import ( ...@@ -5,6 +5,7 @@ from routersploit import (
exploits, exploits,
print_success, print_success,
print_error, print_error,
mute,
) )
...@@ -104,6 +105,7 @@ class Exploit(exploits.Exploit): ...@@ -104,6 +105,7 @@ class Exploit(exploits.Exploit):
print_error("Connection Error") print_error("Connection Error")
return return
@mute
def check(self): def check(self):
ssh = paramiko.SSHClient() ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
......
...@@ -73,6 +73,7 @@ class Exploit(exploits.Exploit): ...@@ -73,6 +73,7 @@ class Exploit(exploits.Exploit):
else: else:
print_error("Exploit failed - could not read sensitive information") print_error("Exploit failed - could not read sensitive information")
@mute
def check(self): def check(self):
cmdGen = cmdgen.CommandGenerator() cmdGen = cmdgen.CommandGenerator()
errorIndication, errorStatus, errorIndex, varBinds = cmdGen.getCmd( errorIndication, errorStatus, errorIndex, varBinds = cmdGen.getCmd(
......
...@@ -79,6 +79,7 @@ class Exploit(exploits.Exploit): ...@@ -79,6 +79,7 @@ class Exploit(exploits.Exploit):
return "" return ""
@mute
def check(self): def check(self):
marker = random_text(32) marker = random_text(32)
cmd = "echo {}".format(marker) cmd = "echo {}".format(marker)
......
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