fixes issue #43

main
byt3bl33d3r 2015-11-11 09:26:01 -07:00
parent 9ebc95519a
commit 4690ca29b9
1 changed files with 6 additions and 6 deletions

View File

@ -45,13 +45,13 @@ def smart_login(host, smb, domain):
smb.kerberosLogin(user, passwd, domain, lmhash, nthash, settings.args.aesKey)
else:
smb.login(user, passwd, domain, lmhash, nthash)
print_succ("{}:{} Login successful {}\\{}:{}".format(host, settings.args.port, domain, user, passwd))
print_succ(u"{}:{} Login successful {}\\{}:{}".format(host, settings.args.port, domain, user, passwd))
settings.args.user = user
settings.args.passwd = passwd
settings.args.hash = ':'.join(lmhash, nthash)
return smb
except SessionError as e:
print_error("{}:{} {}\\{}:{} {}".format(host, settings.args.port, domain, user, passwd, e))
print_error(u"{}:{} {}\\{}:{} {}".format(host, settings.args.port, domain, user, passwd, e))
continue
except Exception as e:
@ -113,12 +113,12 @@ def smart_login(host, smb, domain):
smb.kerberosLogin(user, '', domain, lmhash, nthash, settings.args.aesKey)
else:
smb.login(user, '', domain, lmhash, nthash)
print_succ("{}:{} Login successful {}\\{}:{}".format(host, settings.args.port, domain, user, ntlm_hash))
print_succ(u"{}:{} Login successful {}\\{}:{}".format(host, settings.args.port, domain, user, ntlm_hash))
settings.args.user = user
settings.args.hash = ntlm_hash
return smb
except SessionError as e:
print_error("{}:{} {}\\{}:{} {}".format(host, settings.args.port, domain, user, ntlm_hash, e))
print_error(u"{}:{} {}\\{}:{} {}".format(host, settings.args.port, domain, user, ntlm_hash, e))
continue
if passwords:
@ -132,12 +132,12 @@ def smart_login(host, smb, domain):
smb.kerberosLogin(user, passwd, domain, '', '', settings.args.aesKey)
else:
smb.login(user, passwd, domain)
print_succ("{}:{} Login successful {}\\{}:{}".format(host, settings.args.port, domain, user, passwd))
print_succ(u"{}:{} Login successful {}\\{}:{}".format(host, settings.args.port, domain, user, passwd))
settings.args.user = user
settings.args.passwd = passwd
return smb
except SessionError as e:
print_error("{}:{} {}\\{}:{} {}".format(host, settings.args.port, domain, user, passwd, e))
print_error(u"{}:{} {}\\{}:{} {}".format(host, settings.args.port, domain, user, passwd, e))
continue
raise socket.error #So we fail without a peep