Add script to generate verify json data
This commit is contained in:
parent
eb2c57b68a
commit
aa7a4c4df3
1 changed files with 23 additions and 0 deletions
23
requests/gendata.py
Normal file
23
requests/gendata.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
import json
|
||||
import pyotp
|
||||
|
||||
totp=pyotp.TOTP("PZKBPTHDGSLZBKIZ")
|
||||
|
||||
request={}
|
||||
request['name'] = "info@ungleich.ch"
|
||||
request['verifyname'] = request['name']
|
||||
|
||||
request['token'] = totp.now()
|
||||
request['verifytoken'] = request['token']
|
||||
|
||||
request['realm'] = "ungleich-admin"
|
||||
request['verifyrealm'] = request['realm']
|
||||
|
||||
print(request)
|
||||
print(json.dumps(request))
|
||||
|
||||
data = json.dumps(request)
|
||||
|
||||
with open("outdata", "w") as fd:
|
||||
fd.write(data)
|
||||
fd.write("\n")
|
Loading…
Reference in a new issue