Skip to content

Commit

Permalink
Setting "log_file" property to "None" for smbserver configuration fil…
Browse files Browse the repository at this point in the history
…e ~ will print to console
  • Loading branch information
gabrielg5 committed Aug 12, 2024
1 parent 829239e commit 8fadbc4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/karmaSMB.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(self, smb2Support = False):
smbConfig.set('global','server_name','server_name')
smbConfig.set('global','server_os','UNIX')
smbConfig.set('global','server_domain','WORKGROUP')
smbConfig.set('global','log_file','smb.log')
smbConfig.set('global','log_file','None')
smbConfig.set('global','credentials_file','')

# IPC always needed
Expand Down
6 changes: 1 addition & 5 deletions examples/smbexec.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ def __init__(self):

def cleanup_server(self):
logging.info('Cleaning up..')
try:
os.unlink(SMBSERVER_DIR + '/smb.log')
except OSError:
pass
os.rmdir(SMBSERVER_DIR)

def run(self):
Expand All @@ -79,7 +75,7 @@ def run(self):
smbConfig.set('global','server_name','server_name')
smbConfig.set('global','server_os','UNIX')
smbConfig.set('global','server_domain','WORKGROUP')
smbConfig.set('global','log_file',SMBSERVER_DIR + '/smb.log')
smbConfig.set('global','log_file','None')
smbConfig.set('global','credentials_file','')

# Let's add a dummy share
Expand Down
2 changes: 1 addition & 1 deletion impacket/examples/ntlmrelayx/servers/smbrelayserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self,config):
smbConfig.set('global','server_name','server_name')
smbConfig.set('global','server_os','UNIX')
smbConfig.set('global','server_domain','WORKGROUP')
smbConfig.set('global','log_file','smb.log')
smbConfig.set('global','log_file','None')
smbConfig.set('global','credentials_file','')

if self.config.smb2support is True:
Expand Down

0 comments on commit 8fadbc4

Please sign in to comment.