mirror of
https://github.com/lgandx/Responder.git
synced 2025-12-06 04:31:30 +00:00
Fix for RandomChallenge function. Function getrandbits can return less than 64 bits, thus decode('hex') will crash with TypeError: Odd-length string
This commit is contained in:
2
utils.py
2
utils.py
@@ -26,7 +26,7 @@ import datetime
|
||||
def RandomChallenge():
|
||||
if settings.Config.NumChal == "random":
|
||||
from random import getrandbits
|
||||
NumChal = '%0x' % getrandbits(16 * 4)
|
||||
NumChal = '%016x' % getrandbits(16 * 4)
|
||||
Challenge = ''
|
||||
for i in range(0, len(NumChal),2):
|
||||
Challenge += NumChal[i:i+2].decode("hex")
|
||||
|
||||
Reference in New Issue
Block a user