Fix config property bug

This commit is contained in:
Itay Mizeretz 2017-08-21 11:51:47 +03:00
parent 56a843e35c
commit 97205e6427
4 changed files with 4 additions and 5 deletions

View File

@ -209,8 +209,7 @@ class Configuration(object):
# User and password dictionaries for exploits.
@property
def exploit_user_password_pairs(self):
def get_exploit_user_password_pairs(self):
return product(self.exploit_user_list, self.exploit_password_list)
exploit_user_list = ['Administrator', 'root', 'user']

View File

@ -64,7 +64,7 @@ class SmbExploiter(HostExploiter):
LOG.info("Can't find suitable monkey executable for host %r", host)
return False
user_password_pairs = self._config.exploit_user_password_pairs
user_password_pairs = self._config.get_exploit_user_password_pairs()
exploited = False
for user, password in user_password_pairs:

View File

@ -44,7 +44,7 @@ class SSHExploiter(HostExploiter):
LOG.info("SSH port is closed on %r, skipping", host)
return False
user_password_pairs = self._config.exploit_user_password_pairs
user_password_pairs = self._config.get_exploit_user_password_pairs()
exploited = False
for user, curpass in user_password_pairs:

View File

@ -29,7 +29,7 @@ class WmiExploiter(HostExploiter):
LOG.info("Can't find suitable monkey executable for host %r", host)
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:
LOG.debug("Attempting to connect %r using WMI with password '%s'",