Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve testing suite #315

Merged
merged 15 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions nxc/modules/bh_owned.py

This file was deleted.

4 changes: 1 addition & 3 deletions nxc/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import nxc

NXC_PATH = os.path.expanduser("~/.nxc")
TMP_PATH = os.path.join("/tmp", "nxc_hosted")
if os.name == "nt":
TMP_PATH = os.getenv("LOCALAPPDATA") + "\\Temp\\nxc_hosted"
TMP_PATH = os.getenv("LOCALAPPDATA") + "\\Temp\\nxc_hosted" if os.name == "nt" else os.path.join("/tmp", "nxc_hosted")
if hasattr(sys, "getandroidapilevel"):
TMP_PATH = os.path.join("/data", "data", "com.termux", "files", "usr", "tmp", "nxc_hosted")

Expand Down
7 changes: 4 additions & 3 deletions nxc/protocols/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,10 @@ def execute(self, payload=None, get_output=False):
return False
else:
self.logger.success("Executed command via mssqlexec")
output_lines = StringIO(output).readlines()
for line in output_lines:
self.logger.highlight(line.strip())
if output:
output_lines = StringIO(output).readlines()
for line in output_lines:
self.logger.highlight(line.strip())
return output

@requires_admin
Expand Down
3 changes: 2 additions & 1 deletion tests/data/test_passwords.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Passw0rd!
None
ftp
guest
guest
iamthekingoftheworld
3 changes: 2 additions & 1 deletion tests/data/test_users.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Administrator
Anonymous
ftp
guest
guest
robert.baratheon
Loading
Loading