Skip to content

Commit 9d70105

Browse files
committed
More path fixes
1 parent 69e47d1 commit 9d70105

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

nxc/modules/procdump.py

Lines changed: 6 additions & 4 deletions
Large diffs are not rendered by default.

nxc/modules/schtask_as.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from impacket.dcerpc.v5.dtypes import NULL
55
from impacket.dcerpc.v5 import tsch, transport
66
from nxc.helpers.misc import gen_random_string
7+
from nxc.paths import TMP_PATH
78
from impacket.dcerpc.v5.rpcrt import RPC_C_AUTHN_GSS_NEGOTIATE, RPC_C_AUTHN_LEVEL_PKT_PRIVACY
89

910

@@ -255,7 +256,7 @@ def execute_handler(self, command, fileless=False):
255256
if fileless:
256257
while True:
257258
try:
258-
with open(os.path.join("/tmp", "nxc_hosted", self.__output_filename)) as output:
259+
with open(os.path.join(TMP_PATH, self.__output_filename)) as output:
259260
self.output_callback(output.read())
260261
break
261262
except OSError:

tests/e2e_tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,25 @@ def get_cli_args():
8484
parser.add_argument(
8585
"--test-user-file",
8686
required=False,
87-
default=abspath(f"{script_dir}/data/test_users.txt"),
87+
default=abspath(join(script_dir, "data", "test_users.txt")),
8888
help="Path to the file containing test usernames",
8989
)
9090
parser.add_argument(
9191
"--test-password-file",
9292
required=False,
93-
default=abspath(f"{script_dir}/data/test_passwords.txt"),
93+
default=abspath(join(script_dir, "data", "test_passwords.txt")),
9494
help="Path to the file containing test passwords",
9595
)
9696
parser.add_argument(
9797
"--amsi-bypass-file",
9898
required=False,
99-
default=abspath(f"{script_dir}/data/test_amsi_bypass.txt"),
99+
default=abspath(join(script_dir, "data", "test_amsi_bypass.txt")),
100100
help="Path to the file containing AMSI bypasses",
101101
)
102102
parser.add_argument(
103103
"--test-normal-file",
104104
required=False,
105-
default=abspath(f"{script_dir}/data/test_file.txt"),
105+
default=abspath(join(script_dir, "data", "test_file.txt")),
106106
help="Path to file to upload/download"
107107
)
108108
parser.add_argument(

0 commit comments

Comments
 (0)