Based on l2encdec by DStuff and L2crypt by acmi. Multiplatform.
- XOR: 111, 120, 121
- Blowfish: 211, 212
- RSA: 411, 412, 413, 414 - l2encdec key by default
Drag and drop file(s) onto the executable or use command line options
- -h - print help
- -c string - command -
encode
ordecode
. Defaults todecode
- -p number - protocol -
111
,120
,121
,211
,212
,411
,412
,413
,414
- -o string - output file path
- -v - verify checksum before decoding
- -t - do not add tail/read file without tail (e.g. for Exteel files)
- -f string - force different filename for
xor_filename
- protocol121
- -l - use legacy RSA credentials for decryption; only for protocols
411-414
- -a string - encryption algorithm -
blowfish
,rsa
,xor
,xor_position
,xor_filename
- -m string - custom modulus for
rsa
in hex - -e/-d string - custom public or private exponent for
rsa
in hex - -b string - custom key for
blowfish
- -x string - custom key for
xor
in hex - -s string - custom start index for
xor_position
in hex - -w string - custom wide char header; default: Lineage2Ver + protocol
# Decode a file
$ ./l2encdec -c decode filename.ini
# Encode a file using protocol 413
$ ./l2encdec -c encode -p 413 -o enc-filename.ini dec-filename.ini
# Decode a file with custom RSA modulus and exponent
$ ./l2encdec -c decode -a rsa -m 75b4d6...e2039 -d 1d -w Lineage2Ver413 -o dec-filename.ini filename.ini
- Doesn't include
loader.exe
,loaderCT1.exe
,gg-bps.dll
andpatcher.exe
- Replaced
zlib
withminiz
, added support formini-gmp
- Missing metadata in
111
,120
and121
tails - originall2encdec
bug - Protocol
121
encryption/decryption requires original filename, use-f
option to force it - Input/output paths with spaces are not supported
$ cmake . --preset unix
$ cmake --build --preset unix-build
- Docker >= 27.2.0
$ mkdir -p build
# win32.Dockerfile, win64.Dockerfile or unix.Dockerfile
$ docker build -f dockerfiles/win64.Dockerfile -t l2encdec-builder .
$ docker run --rm -v "$(pwd)/build:/mounted-build" l2encdec-builder
- Visual Studio 17 2022 or newer
- vcpkg - Included with Visual Studio
- CMake - Included with Visual Studio
- DStuff - l2encdec
- Hint - L2 file decoder
- acmi - L2crypt
- Free Software Foundation - gmp, mini-gmp
- richgel999 - miniz
- ddokkaebi - Blowfish
- caballa - FindGMP module for CMake from crab
- Microsoft - getopt from IoTivity project
- peterspackman - mingw-w64 toolchain for CMake
This project is licensed under MIT