Skip to main content

Recover JAR files and launcher metadata from Java application EXEs.

Project description

exe2jar

Recover .jar files and launcher metadata from Java application .exe files.

exe2jar unpacks Jar2Exe and install4j/exe4j Windows launchers into usable .jar files and restore metadata.

Features

.exe Type Restore Rebuild
Jar2Exe
install4j/exe4j
launch4j
  • Restore: unpack the .exe into .jar files and launcher information.
  • Rebuild: create a new .exe from an existing .exe and a replacement .jar.

Usage

Install from PyPI:

pip install exe2jar

Inspect an .exe:

$ exe2jar inspect game.exe
path: game.exe
format: Jar2Exe
size: 7,896,046
config: offset=0x76ea00 size=117
tail_loader: offset=0x76ea89 size=102,757 digest=fc92cddf7ff10154eb3bf5f5aa8a538b
rc_data: offset=0x7d828 size=7,277,729 mode=l3
serial: 000102757t2845x
mainclass: com.riot.main.Main
jre_order: bcsie
jre: ./bin/
libs: bin/lib/libs
app_jar: size=3,412,924 entries=1,901

Restore .jar files:

$ exe2jar restore game.exe
[restore] mode=l3 entries=1901
[restore] L3 AES entry decrypt: 1900
[restore] classes: 1841
[restore] protected classes (J2EMAP): 57
[restore] resources: 2
[restore] restored jar: game_restored/app.jar
[restore] map:          game_restored/restore-map.json

$ ls game_restored
app.jar
jar2exe-config.json
restore-map.json

Restore outputs:

  • app.jar: the recovered application jar.
  • jar2exe-config.json: the parsed Jar2Exe launcher configuration.
  • restore-map.json: class and resource name recovery metadata.

Rebuild a Jar2Exe .exe with a replacement .jar:

$ exe2jar rebuild game.exe game_restored/app.jar -o game_mod.exe
[build] repacked app.jar entries to Jar2Exe hash names: 1,901
[build] prepared app.jar: 3,411,574 bytes
[build] encrypted jar: 3,411,574 bytes (mode=l3)
[build] digest: 2cf193e28fc3f9dd70760d60d3ba941d
[build] output: game_mod.exe (4,029,934 bytes)

$ ls game_mod.exe
game_mod.exe

Development

uv sync --group dev
uv run python -m unittest discover -s tests
uv build --no-sources

Disclaimer

exe2jar is intended for research and authorized analysis only. Do not use it to violate software licenses, bypass access controls, or redistribute proprietary application files without permission. You are responsible for complying with applicable laws and license terms.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exe2jar-0.1.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exe2jar-0.1.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file exe2jar-0.1.0.tar.gz.

File metadata

  • Download URL: exe2jar-0.1.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for exe2jar-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8edab95db610f1b0ac61455f42c5a74b6d71f67a9b2d894c36c82a1ad7ad5997
MD5 b2997e0bfca1b28278b7bd65984b12fa
BLAKE2b-256 12629f0d6d2416e1ff916f9b8d51cefce236301462ef5e50a2fbde15cee50231

See more details on using hashes here.

Provenance

The following attestation bundles were made for exe2jar-0.1.0.tar.gz:

Publisher: python-publish.yml on cnfatal/exe2jar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file exe2jar-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: exe2jar-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for exe2jar-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c2ad0a9594cbd00f5a0fd19505ac51fa0e72ced8930d8a283fe6a16755d2a40
MD5 67a9c1078306a6a084b53af9e280da48
BLAKE2b-256 680303e54830d180e7eabaaa58ddeb46be69fd6ad9f18a100dc7a95ed4b813e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for exe2jar-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on cnfatal/exe2jar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page