forked from p15670423/monkey
Fix config property bug
This commit is contained in:
parent
56a843e35c
commit
97205e6427
|
@ -209,8 +209,7 @@ class Configuration(object):
|
||||||
|
|
||||||
# User and password dictionaries for exploits.
|
# User and password dictionaries for exploits.
|
||||||
|
|
||||||
@property
|
def get_exploit_user_password_pairs(self):
|
||||||
def exploit_user_password_pairs(self):
|
|
||||||
return product(self.exploit_user_list, self.exploit_password_list)
|
return product(self.exploit_user_list, self.exploit_password_list)
|
||||||
|
|
||||||
exploit_user_list = ['Administrator', 'root', 'user']
|
exploit_user_list = ['Administrator', 'root', 'user']
|
||||||
|
|
|
@ -64,7 +64,7 @@ class SmbExploiter(HostExploiter):
|
||||||
LOG.info("Can't find suitable monkey executable for host %r", host)
|
LOG.info("Can't find suitable monkey executable for host %r", host)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
user_password_pairs = self._config.exploit_user_password_pairs
|
user_password_pairs = self._config.get_exploit_user_password_pairs()
|
||||||
|
|
||||||
exploited = False
|
exploited = False
|
||||||
for user, password in user_password_pairs:
|
for user, password in user_password_pairs:
|
||||||
|
|
|
@ -44,7 +44,7 @@ class SSHExploiter(HostExploiter):
|
||||||
LOG.info("SSH port is closed on %r, skipping", host)
|
LOG.info("SSH port is closed on %r, skipping", host)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
user_password_pairs = self._config.exploit_user_password_pairs
|
user_password_pairs = self._config.get_exploit_user_password_pairs()
|
||||||
|
|
||||||
exploited = False
|
exploited = False
|
||||||
for user, curpass in user_password_pairs:
|
for user, curpass in user_password_pairs:
|
||||||
|
|
|
@ -29,7 +29,7 @@ class WmiExploiter(HostExploiter):
|
||||||
LOG.info("Can't find suitable monkey executable for host %r", host)
|
LOG.info("Can't find suitable monkey executable for host %r", host)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
user_password_pairs = self._config.exploit_user_password_pairs
|
user_password_pairs = self._config.get_exploit_user_password_pairs()
|
||||||
|
|
||||||
for user, password in user_password_pairs:
|
for user, password in user_password_pairs:
|
||||||
LOG.debug("Attempting to connect %r using WMI with password '%s'",
|
LOG.debug("Attempting to connect %r using WMI with password '%s'",
|
||||||
|
|
Loading…
Reference in New Issue