mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-05 20:41:22 -07: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:
parent
cf654ee178
commit
de6e869a79
1 changed files with 1 additions and 1 deletions
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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue