mirror of https://github.com/xBytez/duo-cli
Allow for different hotp files/secrets
Just call as ./gen_hotp.py <filename>. If filename is omitted, use default duotoken.hotp.
This commit is contained in:
parent
5a410e565f
commit
389909b424
|
@ -7,7 +7,12 @@ import json
|
||||||
import sys
|
import sys
|
||||||
from urllib2 import unquote
|
from urllib2 import unquote
|
||||||
|
|
||||||
f = open("duotoken.hotp","r+");
|
if len(sys.argv) == 2:
|
||||||
|
file = sys.argv[1]
|
||||||
|
else:
|
||||||
|
file = "duotoken.hotp"
|
||||||
|
|
||||||
|
f = open(file, "r+");
|
||||||
secret = f.readline()[0:-1]
|
secret = f.readline()[0:-1]
|
||||||
offset = f.tell()
|
offset = f.tell()
|
||||||
count = int(f.readline())
|
count = int(f.readline())
|
||||||
|
|
Loading…
Reference in New Issue