Fix path in user-desc module

This commit is contained in:
Alexander Neff
2025-06-10 08:38:57 -04:00
parent e2351bac12
commit ea0a42af7c
+3 -1
View File
@@ -3,6 +3,8 @@ from datetime import datetime
from impacket.ldap import ldap, ldapasn1
from impacket.ldap.ldap import LDAPSearchError
from nxc.paths import NXC_PATH
class NXCModule:
"""
@@ -91,7 +93,7 @@ class NXCModule:
def create_log_file(self, host, time):
"""Create a log file for dumping user descriptions."""
logfile = f"UserDesc-{host}-{time}.log"
logfile = Path.home().joinpath(".nxc").joinpath("logs").joinpath(logfile)
logfile = Path(NXC_PATH).joinpath(logfile)
self.context.log.info(f"Creating log file '{logfile}'")
self.log_file = open(logfile, "w") # noqa: SIM115