Merge branch 'main' into winrm-better-output

main
Marshall Hallenbeck 2023-11-13 10:17:52 -05:00 committed by GitHub
commit fd5d37eb13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 8 deletions

View File

@ -51,3 +51,4 @@ Awesome code contributors of NetExec:
[![](https://github.com/zblurx.png?size=50)](https://github.com/zblurx)
[![](https://github.com/NeffIsBack.png?size=50)](https://github.com/NeffIsBack)
[![](https://github.com/Hackndo.png?size=50)](https://github.com/Hackndo)
[![](https://github.com/XiaoliChan.png?size=50)](https://github.com/XiaoliChan)

View File

@ -9,7 +9,7 @@ import importlib.metadata
def gen_cli_args():
VERSION = importlib.metadata.version("netexec")
CODENAME = "A New Beginning"
CODENAME = "nxc4u"
parser = argparse.ArgumentParser(description=f"""
. .

View File

@ -149,12 +149,18 @@ class NXCModule:
context.log.fail(output_stripped[0])
return
for account in output_stripped:
user, password = account.split(" ", 1)
password = password.replace("WHITESPACE_ERROR", " ")
context.log.highlight(user + ":" + f"{password}")
if " " in password:
context.log.fail(f'Password contains whitespaces! The password for user "{user}" is: "{password}"')
# When powershell returns something else than the usernames and passwords account.split() will throw a ValueError.
# This is likely an error thrown by powershell, so we print the error and the output for debugging purposes.
try:
for account in output_stripped:
user, password = account.split(" ", 1)
password = password.replace("WHITESPACE_ERROR", " ")
context.log.highlight(f"{user}:{password}")
if " " in password:
context.log.fail(f'Password contains whitespaces! The password for user "{user}" is: "{password}"')
except ValueError:
context.log.fail(f"Powershell returned unexpected output: {output_stripped}")
context.log.fail("Please report this issue on GitHub!")
def on_admin_login(self, context, connection):
self.checkVeeamInstalled(context, connection)

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "netexec"
version = "1.0.0"
version = "1.1.0"
description = "The Network Execution tool"
authors = [
"Marshall Hallenbeck <marshall.hallenbeck@gmail.com>",