Agent: Add comment explaining user/password == None in PowerShell

This commit is contained in:
Mike Salvatore 2021-09-01 13:48:13 -04:00
parent e6399de860
commit d30a8b007a
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,8 @@ def get_credentials(
return credentials
# On Windows systems, when username == None and password == None, the current user's credentials
# will be used to attempt to log into the victim.
def _get_empty_credentials(is_windows: bool) -> List[Credentials]:
if is_windows:
return [Credentials(username=None, password=None)]
@ -27,6 +29,8 @@ def _get_empty_credentials(is_windows: bool) -> List[Credentials]:
return []
# On Windows systems, when password == None, the current user's password will bu used to attempt to
# log into the victim.
def _get_username_only_credentials(usernames: List[str], is_windows: bool) -> List[Credentials]:
credentials = [Credentials(username=username, password="") for username in usernames]