Better null session handle

main
mpgn 2021-01-29 05:53:40 -05:00
parent d53343369b
commit b2a53dc896
2 changed files with 7 additions and 6 deletions

View File

@ -79,11 +79,12 @@ class connection(object):
self.enum_host_info()
self.proto_logger()
self.print_host_info()
self.login()
if hasattr(self.args, 'module') and self.args.module:
self.call_modules()
else:
self.call_cmd_args()
# because of null session
if self.login() or (self.username == '' and self.password == ''):
if hasattr(self.args, 'module') and self.args.module:
self.call_modules()
else:
self.call_cmd_args()
def call_cmd_args(self):
for k, v in vars(self.args).items():

View File

@ -533,7 +533,7 @@ class smb(connection):
self.username
)[0][0]
except:
return
pass
permissions = []
try: