Skip to content

Commit b855dac

Browse files
authored
Merge pull request Pennyw0rth#315 from Pennyw0rth/neff-e2e_tests
2 parents ad923f8 + 404bff5 commit b855dac

7 files changed

Lines changed: 72 additions & 220 deletions

File tree

nxc/modules/bh_owned.py

Lines changed: 0 additions & 87 deletions
This file was deleted.

nxc/paths.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
import nxc
44

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

nxc/protocols/mssql.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,10 @@ def execute(self, payload=None, get_output=False):
318318
return False
319319
else:
320320
self.logger.success("Executed command via mssqlexec")
321-
output_lines = StringIO(output).readlines()
322-
for line in output_lines:
323-
self.logger.highlight(line.strip())
321+
if output:
322+
output_lines = StringIO(output).readlines()
323+
for line in output_lines:
324+
self.logger.highlight(line.strip())
324325
return output
325326

326327
@requires_admin

tests/data/test_passwords.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Passw0rd!
22
None
33
ftp
4-
guest
4+
guest
5+
iamthekingoftheworld

tests/data/test_users.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Administrator
22
Anonymous
33
ftp
4-
guest
4+
guest
5+
robert.baratheon

0 commit comments

Comments
 (0)