Skip to content

Commit 044f63b

Browse files
authored
Merge branch 'main' into neff-fix-binary
2 parents 0a42ebb + 3be7a02 commit 044f63b

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

nxc/modules/msol.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Based on the article : https://blog.xpnsec.com/azuread-connect-for-redteam/
44
from sys import exit
55
from os import path
6-
import sys
6+
from nxc.paths import TMP_PATH
77
from nxc.helpers.powershell import get_ps_script
88

99

@@ -49,14 +49,14 @@ def exec_script(self, _, connection):
4949

5050
def on_admin_login(self, context, connection):
5151
if self.use_embedded:
52-
file_to_upload = "/tmp/msol.ps1"
52+
file_to_upload = f"{TMP_PATH}/msol.ps1"
5353

5454
try:
5555
with open(file_to_upload, "w") as msol:
5656
msol.write(self.msol_embedded)
5757
except FileNotFoundError:
5858
context.log.fail(f"Impersonate file specified '{file_to_upload}' does not exist!")
59-
sys.exit(1)
59+
exit(1)
6060

6161
else:
6262
if path.isfile(self.MSOL_PS1):

nxc/modules/scuffy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import ntpath
22
from sys import exit
3+
from nxc.paths import TMP_PATH
34

45

56
class NXCModule:
@@ -44,7 +45,7 @@ def options(self, context, module_options):
4445
exit(1)
4546

4647
self.scf_name = module_options["NAME"]
47-
self.scf_path = f"/tmp/{self.scf_name}.scf"
48+
self.scf_path = f"{TMP_PATH}/{self.scf_name}.scf"
4849
self.file_path = ntpath.join("\\", f"{self.scf_name}.scf")
4950

5051
if not self.cleanup:

0 commit comments

Comments
 (0)