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_ROOT_DIR
as the path of the openssl installed
cmake -B ./cmake_build
cmake --build ./cmake_build --config Release
If 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 -
OPENSSL_LIBRARY_DIR
: openssl library folder path -
OPENSSL_LIBRARIES
: Dependency library name. Typically, this islibcrypto
on Windows, orcrypto
on Linux or macOS -
EXTRA_LINK_ARGS
: This parameter will be appended directly to the linker -
ENABLE_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 build
python -m pip install goodsync
from 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