Skip to content

Commit 0f1c2f9

Browse files
committed
fix extra space
1 parent 450f1b2 commit 0f1c2f9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

nxc/protocols/smb.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,9 @@ def print_host_info(self):
330330

331331
if self.args.generate_hosts_file:
332332
with open(self.args.generate_hosts_file, "a+") as host_file:
333-
host_file.write(f"{self.host} {self.hostname}.{self.targetDomain}{self.targetDomain if isdc else ''} {self.hostname}\n")
334-
self.logger.debug(f"{self.host} {self.hostname}.{self.targetDomain}{self.targetDomain if isdc else ''} {self.hostname}")
333+
dc_part = f" {self.targetDomain}" if isdc else ""
334+
host_file.write(f"{self.host} {self.hostname}.{self.targetDomain}{dc_part} {self.hostname}\n")
335+
self.logger.debug(f"{self.host} {self.hostname}.{self.targetDomain}{dc_part} {self.hostname}")
335336
elif self.args.generate_krb5_file and isdc:
336337
with open(self.args.generate_krb5_file, "w+") as host_file:
337338
data = f"""

0 commit comments

Comments
 (0)