OpenBekenIOT / hid_download_py

BK7231T/BK7231N python-based flasher (both read and write), used mostly to flash https://github.com/openshwprojects/OpenBK7231T_App
61 stars 17 forks source link

Source code for encrypt.exe #9

Open luke-jr opened 2 years ago

luke-jr commented 2 years ago

Where does encrypt.exe come from? Trying to decrypt a firmware on ppc64 Linux...

fust commented 1 year ago

Ran into the same issue and made a quick-and-dirty workaround using Wine. That means it will only work on architectures that support Wine but I guess that's better than nothing (or installing Windows).

Create a file called 'encrypt' in the root of the repository with the following contents:

#!/bin/bash

wine encrypt.exe "$@"

Save it and make it executable (chmod +x encrypt)

Patch bkutils/unpackager.py line 46 to say this:

        os.system("./encrypt "+destfile+"  510fb093 a3cbeadc 5993a17e c7adeb03 10000")

Unpackaging should now work.

biemster commented 9 months ago

In case you are still looking for the source, this is probably it: https://github.com/ghsecuritylab/tysdk_for_bk7231/tree/master/toolchain/encrypt_crc