#2925 Replace try catch logic with a more elegant solution.
This commit is contained in:
committed by
Marek Wolan
parent
f532b5e0da
commit
7f3d166de0
@@ -384,11 +384,11 @@ class TAP003(AbstractTAP, discriminator="tap-003"):
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
self.logger.info(f"Changing password on remote node {hostname}")
|
self.logger.info(f"Changing password on remote node {hostname}")
|
||||||
try:
|
if len(account_changes) == 0:
|
||||||
self._next_account_change = account_changes.pop(0)
|
|
||||||
except IndexError:
|
|
||||||
self.logger.info("No further account changes required.")
|
self.logger.info("No further account changes required.")
|
||||||
self._next_account_change = None
|
self._next_account_change = None
|
||||||
|
else:
|
||||||
|
self._next_account_change = account_changes.pop(0)
|
||||||
self._change_password_target_host = hostname
|
self._change_password_target_host = hostname
|
||||||
if not self._next_account_change:
|
if not self._next_account_change:
|
||||||
self.logger.info("Manipulation complete. Progressing to exploit...")
|
self.logger.info("Manipulation complete. Progressing to exploit...")
|
||||||
|
|||||||
Reference in New Issue
Block a user