bkerler / oppo_decrypt

Oppo .ofp Firmware decrypter and oneplus .ops de-/encrypter
541 stars 186 forks source link

opscrypto.py encrypt won't work #88

Open Tintarul opened 1 year ago

Tintarul commented 1 year ago

First issue: encrypt uses /settings.xml instead of /Setting.xml Second Issue:

C:/my/path>py opscrypto.py encrypt C:/my/path/extracted
Oneplus CryptTools V1.4 (c) B. Kerler 2019-2021
----------------------------

Encrypting prog_firehose_ddr.elf, pos=0
Traceback (most recent call last):
  File "C:/my/path/opscrypto.py", line 748, in <module>
    main()
  File "C:/my/path/opscrypto.py", line 677, in main
    item, pos = encryptitem(key, item, directory, pos, wf)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:/my/path/opscrypto.py", line 504, in encryptitem
    assert item.attrib["FileOffsetInSrc"] == str(start), (item, item.attrib["FileOffsetInSrc"], str(start))
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'FileOffsetInSrc'
snkj22 commented 10 months ago

Traceback (most recent call last): File "D:\enc\opscrypto.py", line 748, in main() File "D:\enc\opscrypto.py", line 685, in main item, pos = copyitem(item, directory, pos, wf) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\enc\opscrypto.py", line 534, in copyitem assert item.attrib["FileOffsetInSrc"] == str(start), (item, item.attrib["FileOffsetInSrc"], str(start)) AssertionError: (<Element 'program' at 0x00000263F9A5FBF0>, '6303712', '5820663')