diff --git a/nxc/modules/user-desc.py b/nxc/modules/user-desc.py index 47d6e574..1faacd72 100644 --- a/nxc/modules/user-desc.py +++ b/nxc/modules/user-desc.py @@ -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