andry08 / ArubaOTP-seed-extractor

Extract TOTP seed instead of using ArubaOTP app
MIT License
75 stars 9 forks source link

Firma Digitale Aruba #13

Closed alvi76 closed 2 years ago

alvi76 commented 2 years ago

Non sono riuscito a far funzionare lo script con "Firma Remota con Otp Mobile" by Aruba:

Traceback (most recent call last):
  File "./scripts/main.py", line 95, in main
    extract(args.activation_code, args.only_output, args.show_qr)
  File "./scripts/main.py", line 23, in extract
    seed = extractor.extract_otp(activation_code)
  File "/content/ArubaOTP-seed-extractor/scripts/request.py", line 44, in extract_otp
    raise Exception('Error occured in seed validation: [{}] {}'.format(resp2['returncode'], resp2['description']))
Exception: Error occured in seed validation: [0005] Validazione licenza fallita sync non riuscito
Traceback (most recent call last):
  File "/content/ArubaOTP-seed-extractor/scripts/totptest.py", line 10, in generate
    with open(os.path.join(os.sys.path[0], 'seed.txt'), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/content/ArubaOTP-seed-extractor/scripts/seed.txt'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "./scripts/main.py", line 99, in main
    generate(args.seed, args.time)
  File "./scripts/main.py", line 33, in generate
    code = totptest.generate(seed, time)
  File "/content/ArubaOTP-seed-extractor/scripts/totptest.py", line 13, in generate
    raise Exception('Error while reading seed file, make sure to execute the request.py script before this') from e
Exception: Error while reading seed file, make sure to execute the request.py script before this
andry08 commented 2 years ago

Non é riuscito a validare il codice otp, potrebbe avere a che fare con #12 ma non sono sicuro del perché aruba dovrebbe fare una cosa del genere (30 secondi per alcuni codici e 60 per altri). Per sfatare il dubbio, prova il fork https://github.com/ale-saglia/ArubaOTP-seed-extractor é stato cambiato il periodo appunto a 30 secondi, se ti funziona allora ci sarà da investigare ulteriormente

alvi76 commented 2 years ago

Ho provato con il fork https://github.com/ale-saglia/ArubaOTP-seed-extractor positivamente! Risolto.

andry08 commented 2 years ago

Ok allora dovrò effettivamente investigare sul perché di questa differenza, forse anche #12 si riferisce alla firma remota. Grazie del feedback!