Add script to generate verify json data

This commit is contained in:
Nico Schottelius 2018-11-17 12:08:43 +01:00
parent eb2c57b68a
commit aa7a4c4df3

23
requests/gendata.py Normal file
View 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")