Merge branch 'main' into winrm-better-output
commit
fd5d37eb13
|
@ -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)
|
||||
|
|
|
@ -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"""
|
||||
. .
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>",
|
||||
|
|
Loading…
Reference in New Issue