Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrypting G3100 config #12

Open
superswan opened this issue Nov 8, 2023 · 1 comment
Open

Decrypting G3100 config #12

superswan opened this issue Nov 8, 2023 · 1 comment

Comments

@superswan
Copy link

Hello, I was wondering if there is any information on decrypting the config for a G3100, the config file is exported as .cfg and not a bin, not sure if it has a different file structure and/or encrypted differently.

Traceback (most recent call last):
  File "/home/debbie/decrypt.py", line 59, in <module>
    main()
  File "/home/debbie/decrypt.py", line 45, in main
    json_data = decrypt(data_in)
                ^^^^^^^^^^^^^^^^
  File "/home/debbie/decrypt.py", line 23, in decrypt
    cipher = AES.new(KEY, AES.MODE_CBC, iv)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/debbie/venv/lib/python3.11/site-packages/Crypto/Cipher/AES.py", line 228, in new
    return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/debbie/venv/lib/python3.11/site-packages/Crypto/Cipher/__init__.py", line 79, in _create_cipher
    return modes[mode](factory, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/debbie/venv/lib/python3.11/site-packages/Crypto/Cipher/_mode_cbc.py", line 287, in _create_cbc_cipher
    raise ValueError("Incorrect IV length (it must be %d bytes long)" %
ValueError: Incorrect IV length (it must be 16 bytes long)
@Rubyheart
Copy link

I'm having a similar issue with a G3100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants