Unverified Commit 16dfbcb2 by Marcin Bury Committed by GitHub

Adding tests for modules default values (#524)

* Adding tests for default option values

* Workaround for Options descriptors bug
parent b6f3ac37
......@@ -15,7 +15,8 @@ lint:
python3 -m flake8 --exclude=$(EXCLUDED) --ignore=$(FLAKE8_IGNORED_RULES) $(DIRECTORY)
tests: clean
python3 -m pytest -n16 tests
python3 -m pytest -n16 tests/core/ tests/test_exploit_scenarios.py tests/test_module_info.py
python3 -m pytest -n16 tests/exploits/ tests/creds/ tests/encoders/ tests/generic/ tests/payloads/
clean:
find . -name '*.pyc' -exec rm -f {} +
......
......@@ -19,4 +19,4 @@ class Exploit(FTPDefault):
port = OptPort(21, "Target FTP port")
threads = OptInteger(1, "Number of threads")
defaults = OptWordlist("admin:12345,admin:123456,Admin:12345, Admin:123456", "User:Pass or file with default credentials (file://)")
defaults = OptWordlist("admin:12345,admin:123456,Admin:12345,Admin:123456", "User:Pass or file with default credentials (file://)")
......@@ -20,7 +20,7 @@ class Exploit(HTTPClient):
threads = OptInteger(1, "Number of threads")
defaults = OptWordlist("admin:12345,admin:123456,Admin:12345,Admin:123456", "User:Pass or file with default ccredentials (file://)")
stop_on_success = OptBool(False, "Stop on first valid authentication attempt")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
......
......@@ -21,7 +21,7 @@ class Exploit(HTTPClient):
threads = OptInteger(1, "Number of threads")
defaults = OptWordlist("admin:admin", "User:Pass or file with default credentials (file://)")
stop_on_success = OptBool(False, "Stop on first valid authentication attempt")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
......
......@@ -19,4 +19,4 @@ class Exploit(SSHDefault):
port = OptPort(22, "Target SSH port")
threads = OptInteger(1, "Number of threads")
default = OptWordlist("supervistor:supervisor", "User:Pass or file with default credentials (file://)")
defaults = OptWordlist("supervisor:supervisor", "User:Pass or file with default credentials (file://)")
......@@ -24,8 +24,8 @@ class Exploit(FTPClient):
usernames = OptWordlist("admin", "Username or file with usernames (file://)")
passwords = OptWordlist(wordlists.passwords, "Password or file with passwords (file://)")
verbosity = OptBool(True, "Display authentication attempts")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
self.credentials = []
......
......@@ -22,8 +22,8 @@ class Exploit(FTPClient):
threads = OptInteger(8, "Number of threads")
defaults = OptWordlist(wordlists.defaults, "User:Pass pair or file with default credentials (file://)")
verbosity = OptBool(True, "Display authentication attempts")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
self.credentials = []
......
......@@ -29,8 +29,8 @@ class Exploit(HTTPClient):
path = OptString("/", "URL Path")
verbosity = OptBool(True, "Display authentication attempts")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
self.credentials = []
......
......@@ -27,8 +27,8 @@ class Exploit(HTTPClient):
path = OptString("/", "URL Path")
verbosity = OptBool(True, "Display authentication attempts")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
self.credentials = []
......
......@@ -24,8 +24,8 @@ class Exploit(SNMPClient):
defaults = OptWordlist(wordlists.snmp, "SNMP community string or file with default communit stryings (file://)")
verbosity = OptBool(True, "Display authentication attempts")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
self.strings = []
......
......@@ -25,8 +25,8 @@ class Exploit(SSHClient):
usernames = OptWordlist("admin", "Username or file with usernames (file://)")
passwords = OptWordlist(wordlists.passwords, "Password or file with passwords (file://)")
verbosity = OptBool(True, "Display authentication attempts")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
self.credentials = []
......
......@@ -23,8 +23,8 @@ class Exploit(SSHClient):
defaults = OptWordlist(wordlists.defaults, "User:Pass or file with default credentials (file://)")
verbosity = OptBool(True, "Display authentication attempts")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
self.credentials = []
......
......@@ -25,8 +25,8 @@ class Exploit(TelnetClient):
usernames = OptWordlist("admin", "Username or file with usernames (file://)")
passwords = OptWordlist(wordlists.passwords, "Password or file with passwords (file://)")
verbosity = OptBool(True, "Display authentication attempts")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
self.credentials = []
......
......@@ -23,8 +23,8 @@ class Exploit(TelnetClient):
defaults = OptWordlist(wordlists.defaults, "User:Pass or file with default credentials (file://)")
verbosity = OptBool(True, "Display authentication attempts")
stop_on_success = OptBool(True, "Stop on first valid authentication attempt")
verbosity = OptBool(True, "Display authentication attempts")
def run(self):
self.credentials = []
......
......@@ -19,4 +19,4 @@ class Exploit(FTPDefault):
port = OptPort(21, "Target FTP port")
threads = OptInteger(1, "Number of threads")
defaults = OptWordlist("admin:admin,suppport:support,user:user", "User:Pass or file with default credentials (file://)")
defaults = OptWordlist("admin:admin,support:support,user:user", "User:Pass or file with default credentials (file://)")
......@@ -20,4 +20,4 @@ class Exploit(HTTPBasicDigestDefault):
path = OptString("/", "Target path")
threads = OptInteger(1, "Number of threads")
default = OptWordlist("admin:admin,support:support,user:user", "User:Pass or file with default credentials (file://)")
defaults = OptWordlist("admin:admin,support:support,user:user", "User:Pass or file with default credentials (file://)")
......@@ -19,4 +19,4 @@ class Exploit(SSHDefault):
port = OptPort(22, "Target SSH port")
threads = OptInteger(1, "Number of threads")
defaults = OptWordlist("admin:admin,admin:passsword,root:root,Admin:Admin", "User:Pass or file with default credentials (file://)")
defaults = OptWordlist("admin:admin,admin:password,root:root,Admin:Admin", "User:Pass or file with default credentials (file://)")
......@@ -19,4 +19,4 @@ class Exploit(SSHDefault):
port = OptPort(22, "Target SSH port")
threads = OptInteger(1, "Number of threads")
defaults = OptWordlist("admin:admin:1234:1234,:root:12345,root:root", "User:Pass or file with default credentials (file://)")
defaults = OptWordlist("admin:admin,1234:1234,root:12345,root:root", "User:Pass or file with default credentials (file://)")
......@@ -15,7 +15,7 @@ class Exploit(SSHDefault):
),
}
target = OptIP("", "Target IPv4, IPv6 adddress or file with ip:port (file://)")
target = OptIP("", "Target IPv4, IPv6 address or file with ip:port (file://)")
port = OptPort(22, "Target SSH port")
threads = OptInteger(1, "Number of threads")
......
......@@ -16,7 +16,7 @@ class Exploit(TelnetDefault):
}
target = OptIP("", "Target IPv4, IPv6 address or file with ip:port (file://)")
port = OptPort(21, "Target Telnet port")
port = OptPort(23, "Target Telnet port")
threads = OptInteger(1, "Number of threads")
defaults = OptWordlist("admin:admin,1234:1234", "User:Pass or file with default credentials (file://)")
......@@ -16,7 +16,7 @@ class Exploit(TelnetDefault):
}
target = OptIP("", "Target IPv4, IPv6 address or file with ip:port (file://)")
port = OptPort(22, "Target Telnet port")
port = OptPort(23, "Target Telnet port")
threads = OptInteger(1, "Number of threads")
defaults = OptWordlist("admin:admin,admin:1234,admin:", "User:Pass or file with default credentials (file://)")
......@@ -16,7 +16,7 @@ class Exploit(TelnetDefault):
}
target = OptIP("", "Target IPv4, IPv6 address or file with ip:port (file://)")
port = OptPort(21, "Target Telnet port")
port = OptPort(23, "Target Telnet port")
threads = OptInteger(1, "Number of threads")
defaults = OptWordlist("admin:admin", "User:Pass or file with default credentials (file://)")
......@@ -22,7 +22,7 @@ class Exploit(HTTPClient):
target = OptIP("", "Target IPv4 or IPv6 address")
port = OptPort(80, "Target HTTP port")
cmd = OptString("telnted", "Command to execute")
cmd = OptString("telnetd", "Command to execute")
def auth_bypass(self):
response = self.http_request(
......
......@@ -120,7 +120,7 @@ class Exploit(HTTPClient):
def run(self):
devices = self._Exploit__info__['devices']
if self.device == '' or re.match("^\d+?$", self.device) is None or int(self.device) < 0 or int(self.device) >= len(devices):
if self.device == "" or re.match("^\d+?$", self.device) is None or int(self.device) < 0 or int(self.device) >= len(devices):
print_error("Invalid device identifier option")
return
number = devices[int(self.device)]['number']
......
......@@ -2,9 +2,17 @@ from routersploit.modules.creds.cameras.acti.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:12345", "admin:123456", "Admin:12345", "Admin:123456"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,17 @@ from routersploit.modules.creds.cameras.acti.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:12345", "admin:123456", "Admin:12345", "Admin:123456"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,17 @@ from routersploit.modules.creds.cameras.acti.telnet_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:12345", "admin:123456", "Admin:12345", "Admin:123456"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -10,12 +10,20 @@ def apply_response(*args, **kwargs):
def test_check_success(target):
""" Test scenario - successful check """
""" Test scenario - testing against HTTP server """
route_mock = target.get_route_mock("/video.htm", methods=["GET", "POST"])
route_mock.side_effect = apply_response
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 80
assert exploit.threads == 1
assert exploit.defaults == ["admin:12345", "admin:123456", "Admin:12345", "Admin:123456"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.american_dynamics.ftp_default_creds impo
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin", "admin:9999"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.american_dynamics.ssh_default_creds impo
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin", "admin:9999"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.american_dynamics.telnet_default_creds i
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin", "admin:9999"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.arecont.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:", ":"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.arecont.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:", ":"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.arecont.telnet_default_creds import Expl
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:", ":"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.avigilon.ftp_default_creds import Exploi
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin", "Administrator:"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.avigilon.ssh_default_creds import Exploi
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin", "Administrator:"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.avigilon.telnet_default_creds import Exp
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin", "Administrator:"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.avtech.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.avtech.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.avtech.telnet_default_creds import Explo
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.axis.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["root:pass", "admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.axis.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["root:pass", "admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.axis.telnet_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["root:pass", "admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -16,12 +16,19 @@ def apply_response(*args, **kwargs):
def test_check_success(target):
""" Test scenario - successful check """
""" Test scenario - testing against HTTP server """
cgi_mock = target.get_route_mock("/", methods=["GET", "POST"])
cgi_mock.side_effect = apply_response
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 80
assert exploit.threads == 1
assert exploit.defaults == ["root:pass", "root:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.basler.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.basler.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.basler.telnet_default_creds import Explo
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,12 +2,19 @@ from routersploit.modules.creds.cameras.basler.webinterface_http_form_default_cr
def test_check_success(target):
""" Test scenario - successful check """
""" Test scenario - testing against HTTP server """
route_mock = target.get_route_mock("/cgi-bin/auth_if.cgi", methods=["GET", "POST"])
route_mock.return_value = "success: true"
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 80
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.brickcom.ftp_default_creds import Exploi
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.brickcom.ssh_default_creds import Exploi
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.brickcom.telnet_default_creds import Exp
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -16,12 +16,19 @@ def apply_response(*args, **kwargs):
def test_check_success(target):
""" Test scenario - successful check """
""" Test scenario - testing against HTTP server """
cgi_mock = target.get_route_mock("/", methods=["GET", "POST"])
cgi_mock.side_effect = apply_response
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 80
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.canon.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["root:camera"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.canon.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["root:camera"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.canon.telnet_default_creds import Exploi
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["root:camera"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -16,12 +16,19 @@ def apply_response(*args, **kwargs):
def test_check_success(target):
""" Test scenario - successful check """
""" Test scenario - testing against HTTP server """
cgi_mock = target.get_route_mock("/admin/index.html", methods=["GET", "POST"])
cgi_mock.side_effect = apply_response
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 80
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.cisco.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.cisco.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.cisco.telnet_default_creds import Exploi
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.dlink.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.dlink.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.dlink.telnet_default_creds import Exploi
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.geovision.ftp_default_creds import Explo
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.geovision.ssh_default_creds import Explo
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.geovision.telnet_default_creds import Ex
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.grandstream.ftp_default_creds import Exp
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.grandstream.ssh_default_creds import Exp
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.grandstream.telnet_default_creds import
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.hikvision.ftp_default_creds import Explo
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:12345"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.hikvision.ssh_default_creds import Explo
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH jserver """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:12345"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.hikvision.telnet_default_creds import Ex
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:12345"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.honeywell.ftp_default_creds import Explo
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:1234"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.honeywell.ssh_default_creds import Explo
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:1234"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.honeywell.telnet_default_creds import Ex
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:1234"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.iqinvision.ftp_default_creds import Expl
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["root:system"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.iqinvision.ssh_default_creds import Expl
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["root:system"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.iqinvision.telnet_default_creds import E
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["root:system"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.jvc.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:jvc"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.jvc.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:jvc"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.jvc.telnet_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:jvc"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.mobotix.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:meinsm"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.mobotix.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:meinsm"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.mobotix.telnet_default_creds import Expl
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:meinsm"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.samsung.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:1111111", "admin:4321", "root:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.samsung.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:1111111", "admin:4321", "root:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.samsung.telnet_default_creds import Expl
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:1111111", "admin:4321", "root:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.sentry360.ftp_default_creds import Explo
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:1234"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.sentry360.ssh_default_creds import Explo
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:1234"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.sentry360.telnet_default_creds import Ex
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:1234"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.siemens.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.siemens.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.siemens.telnet_default_creds import Expl
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.speco.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:1234"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.speco.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:1234"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.speco.telnet_default_creds import Exploi
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:1234"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.stardot.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.stardot.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.stardot.telnet_default_creds import Expl
def test_check_success(generic_target):
""" Test scenario - successful check """
""" Test scenario - testing against Telnet server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 23
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.vacron.ftp_default_creds import Exploit
def test_check_success(generic_target):
""" Test scenario - testing against Telnet server """
""" Test scenario - testing against FTP server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 21
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = generic_target.host
exploit.port = generic_target.port
......
......@@ -2,9 +2,16 @@ from routersploit.modules.creds.cameras.vacron.ssh_default_creds import Exploit
def test_check_success(target):
""" Test scenario - testing against HTTP server """
""" Test scenario - testing against SSH server """
exploit = Exploit()
assert exploit.target == ""
assert exploit.port == 22
assert exploit.threads == 1
assert exploit.defaults == ["admin:admin"]
assert exploit.stop_on_success is True
assert exploit.verbosity is True
exploit.target = target.host
exploit.port = target.port
......
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