|
46 | 46 | from nxc.protocols.ldap.kerberos import KerberosAttacks |
47 | 47 | from nxc.parsers.ldap_results import parse_result_attributes |
48 | 48 | from nxc.helpers.ntlm_parser import parse_challenge |
49 | | -from nxc.paths import CONFIG_PATH, NXC_PATH |
| 49 | +from nxc.paths import CONFIG_PATH |
50 | 50 |
|
51 | 51 | ldap_error_status = { |
52 | 52 | "1": "STATUS_NOT_SUPPORTED", |
@@ -149,7 +149,6 @@ def __init__(self, args, db, host): |
149 | 149 | self.targetDomain = "" |
150 | 150 | self.remote_ops = None |
151 | 151 | self.bootkey = None |
152 | | - self.output_filename = None |
153 | 152 | self.smbv1 = None |
154 | 153 | self.signing = False |
155 | 154 | self.signing_required = None |
@@ -333,9 +332,6 @@ def enum_host_info(self): |
333 | 332 | self.kdcHost = result["host"] if result else None |
334 | 333 | self.logger.info(f"Resolved domain: {self.domain} with dns, kdcHost: {self.kdcHost}") |
335 | 334 |
|
336 | | - filename = f"{self.hostname}_{self.host}".replace(":", "-") |
337 | | - self.output_filename = os.path.expanduser(os.path.join(NXC_PATH, "logs", filename)) |
338 | | - |
339 | 335 | try: |
340 | 336 | self.db.add_host( |
341 | 337 | self.host, |
@@ -1681,11 +1677,9 @@ def bloodhound(self): |
1681 | 1677 | self.logger.debug(f"BloodHound collection failed: {e.__class__.__name__} - {e}", exc_info=True) |
1682 | 1678 | return |
1683 | 1679 |
|
1684 | | - self.output_filename += f"_{timestamp}" |
1685 | | - |
1686 | | - self.logger.highlight(f"Compressing output into {self.output_filename}bloodhound.zip") |
| 1680 | + self.logger.highlight(f"Compressing output into {self.output_filename}_bloodhound.zip") |
1687 | 1681 | list_of_files = os.listdir(os.getcwd()) |
1688 | | - with ZipFile(self.output_filename + "bloodhound.zip", "w") as z: |
| 1682 | + with ZipFile(f"{self.output_filename}_bloodhound.zip", "w") as z: |
1689 | 1683 | for each_file in list_of_files: |
1690 | 1684 | if each_file.startswith(self.output_filename.split("/")[-1]) and each_file.endswith("json"): |
1691 | 1685 | z.write(each_file) |
|
0 commit comments