mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-05 20:41:22 -07:00
Added: Random challenge for each requests (default)
This commit is contained in:
parent
17dc81cb68
commit
1d38cd39af
7 changed files with 62 additions and 41 deletions
11
utils.py
11
utils.py
|
@ -23,6 +23,17 @@ import time
|
|||
import settings
|
||||
import datetime
|
||||
|
||||
def RandomChallenge():
|
||||
if settings.Config.NumChal == "random":
|
||||
from random import getrandbits
|
||||
NumChal = '%0x' % getrandbits(16 * 4)
|
||||
Challenge = ''
|
||||
for i in range(0, len(NumChal),2):
|
||||
Challenge += NumChal[i:i+2].decode("hex")
|
||||
return Challenge
|
||||
else:
|
||||
return settings.Config.Challenge
|
||||
|
||||
def HTTPCurrentDate():
|
||||
Date = datetime.datetime.utcnow().strftime('%a, %d %b %Y %H:%M:%S GMT')
|
||||
return Date
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue