Reverse engineering of GoodSync file name encryption and decryption algorithms
Help GoodSync users switch to other synchronization tools more freely without being bound by GoodSync
The project only implements encryption and decryption functions, and does not include directory or file processing, synchronization and other functions. If you have good ideas, welcome to PR and let us improve the code together.
We also provide python extensions for easy embedding into python projects. If you have implementations in other languages, you are welcome to PR
Read in other languages: English | 简体中文
Install openssl development package
Configure the environment variable
OPENSSL_INCLUDE_DIR: Openssl include folder path. For example, on Windows it isC:\Program Files\OpenSSL-Win64\includeOPENSSL_LIBRARY_DIR: Openssl library folder path. For example, on Windows it isC:\Program Files\OpenSSL-Win64\libOPENSSL_LIBRARIES: Dependency library name. Usually, justcryptois OK
Configure your cmake tool
cmake -B ./cmake_build
cmake --build ./cmake_build --config ReleaseIf you don't know enough about C and Python, I recommend using the released wheel.
Usually you don't need to configure environment variables, the builder will automatically look for the location of openssl.
By default, it is dynamically linked, you need to use auditwheel or similar tools to fix it, this is common sense
about python packaging, if you plan to build it you should get this knowledge.
OPENSSL_INCLUDE_DIR: Openssl include folder path. For example, on Windows it isC:\Program Files\OpenSSL-Win64\includeOPENSSL_LIBRARY_DIR: Openssl library folder path. For example, on Windows it isC:\Program Files\OpenSSL-Win64\libOPENSSL_LIBRARIES: Dependency library name. Usually, justcryptois OKEXTRA_LINK_ARGS: This parameter will be appended directly to the linkerENABLE_PKG_CONFIG: whether to use pkg-config to search openssl, need install pkg-config maybe
cd goodsync/python
python -m pip install build
python -m buildpython -m pip install goodsyncfrom goodsync import *
gs = GoodSync("0123456789")
print(gs.key)
encrypted_filename = gs.encrypt_name("test")
print(encrypted_filename)
filename = gs.decrypt_name(encrypted_filename)
print(filename)Apache-2.0 © bitjerry
2024/4/1 Mr.lin