mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-21 13:53:42 -07:00
fixed encoding issues
This commit is contained in:
parent
bde0ba95d6
commit
85bafe1670
1 changed files with 5 additions and 0 deletions
5
utils.py
5
utils.py
|
@ -401,6 +401,11 @@ def SaveToDb(result):
|
||||||
for k in [ 'module', 'type', 'client', 'hostname', 'user', 'cleartext', 'hash', 'fullhash' ]:
|
for k in [ 'module', 'type', 'client', 'hostname', 'user', 'cleartext', 'hash', 'fullhash' ]:
|
||||||
if not k in result:
|
if not k in result:
|
||||||
result[k] = ''
|
result[k] = ''
|
||||||
|
if isinstance(result[k], str) and '\x00' in result[k]:
|
||||||
|
# some strings have a mixed encoding in a single string
|
||||||
|
# correct decoding is not possible
|
||||||
|
result[k] = result[k].replace("\x00","")
|
||||||
|
|
||||||
result['client'] = result['client'].replace("::ffff:","")
|
result['client'] = result['client'].replace("::ffff:","")
|
||||||
if len(result['user']) < 2:
|
if len(result['user']) < 2:
|
||||||
print(color('[*] Skipping one character username: %s' % result['user'], 3, 1))
|
print(color('[*] Skipping one character username: %s' % result['user'], 3, 1))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue