Fix config erasing of creds
This commit is contained in:
parent
f1b7fb6706
commit
875eba393c
|
@ -111,16 +111,7 @@ class ChaosMonkey(object):
|
||||||
ControlClient.keepalive()
|
ControlClient.keepalive()
|
||||||
ControlClient.load_control_config()
|
ControlClient.load_control_config()
|
||||||
|
|
||||||
# TODO: this is temporary until we change server to support changing of config.
|
self.update_config_creds(additional_creds)
|
||||||
for user in list(additional_creds):
|
|
||||||
if user not in WormConfiguration.exploit_user_list:
|
|
||||||
WormConfiguration.exploit_user_list.append(user)
|
|
||||||
|
|
||||||
creds = additional_creds[user]
|
|
||||||
if creds.has_key('password'):
|
|
||||||
password = creds['password']
|
|
||||||
if password not in WormConfiguration.exploit_password_list:
|
|
||||||
WormConfiguration.exploit_password_list.append(password)
|
|
||||||
|
|
||||||
LOG.debug("Users to try: %s" % str(WormConfiguration.exploit_user_list))
|
LOG.debug("Users to try: %s" % str(WormConfiguration.exploit_user_list))
|
||||||
LOG.debug("Passwords to try: %s" % str(WormConfiguration.exploit_password_list))
|
LOG.debug("Passwords to try: %s" % str(WormConfiguration.exploit_password_list))
|
||||||
|
@ -142,6 +133,9 @@ class ChaosMonkey(object):
|
||||||
if ControlClient.check_for_stop():
|
if ControlClient.check_for_stop():
|
||||||
break
|
break
|
||||||
|
|
||||||
|
# TODO: Consider removing later
|
||||||
|
self.update_config_creds(additional_creds)
|
||||||
|
|
||||||
is_empty = False
|
is_empty = False
|
||||||
for finger in self._fingerprint:
|
for finger in self._fingerprint:
|
||||||
LOG.info("Trying to get OS fingerprint from %r with module %s",
|
LOG.info("Trying to get OS fingerprint from %r with module %s",
|
||||||
|
@ -260,4 +254,16 @@ class ChaosMonkey(object):
|
||||||
except Exception, exc:
|
except Exception, exc:
|
||||||
LOG.error("Exception in self delete: %s", exc)
|
LOG.error("Exception in self delete: %s", exc)
|
||||||
|
|
||||||
|
def update_config_creds(self, additional_creds):
|
||||||
|
# TODO: this is temporary until we change server to support changing of config.
|
||||||
|
for user in list(additional_creds):
|
||||||
|
if user not in WormConfiguration.exploit_user_list:
|
||||||
|
WormConfiguration.exploit_user_list.append(user)
|
||||||
|
|
||||||
|
creds = additional_creds[user]
|
||||||
|
if creds.has_key('password'):
|
||||||
|
password = creds['password']
|
||||||
|
if password not in WormConfiguration.exploit_password_list:
|
||||||
|
WormConfiguration.exploit_password_list.append(password)
|
||||||
|
|
||||||
LOG.info("Monkey is shutting down")
|
LOG.info("Monkey is shutting down")
|
||||||
|
|
Loading…
Reference in New Issue