Add count for tool/gnuk_get_random.py.

This commit is contained in:
NIIBE Yutaka 2019-02-24 15:12:12 +09:00
parent 076d727061
commit 126283b1ac

View File

@ -5,11 +5,17 @@ from binascii import hexlify
import sys
if __name__ == '__main__':
count = 0
gnuk = get_gnuk_device()
gnuk.cmd_select_openpgp()
looping = (len(sys.argv) > 1)
while True:
try:
challenge = gnuk.cmd_get_challenge().tostring()
except Exception as e:
print(count)
raise e
print(hexlify(challenge))
count = count + 1
if not looping:
break