Wakaru is the Javascript decompiler for modern frontend. It brings back the original code from a bundled and transpiled source.
See live demo for detailed examples.
Converts transpiled code back to its readable form and restores downgraded syntaxes.
Supports the following transpilers:
Read the documentation for more information.
Converts bundled JavaScript into separated modules
Supports the following bundlers:
Test the tool and see it in action at Playground.
By default, the CLI will run in interactive mode and guide you through the process.\ You can also pass options to skip some steps in the interactive mode.
npx @wakaru/cli
# or
pnpm dlx @wakaru/cli
Run npx @wakaru/cli --help
to see the full list of options.
Option | Default | Description |
---|---|---|
--output |
"out" |
Output directory |
--force |
false |
Force overwrite output directory |
--concurrency |
1 |
Specific the number of concurrent tasks |
--perf |
false |
Show performance metrics |
--perf-output |
Performance metrics output directory |
--concurrency
can be used to speed up the process. But please aware that the process might OOM if the input file is too large.
If you want to run the CLI in non-interactive mode, you can specify the feature by passing the feature name as the first argument.
unpacker
and unminify
will run only the corresponding feature.\
all
will run both unpacker
and unminify
sequentially.
npx @wakaru/cli all <files...> [options]
npx @wakaru/cli unpacker <files...> [options]
npx @wakaru/cli unminify <files...> [options]
These options are only available in all
mode.
Option | Default | Description |
---|---|---|
--unpacker-output |
"out/unpack" |
Override unpacker output directory |
--unminify-output |
"out/unminify" |
Override unminify output directory |
When running a single feature (either unpacker
or unminify
), the CLI will only uses the path specified in the --output
option. This means that, unlike in the all
mode where subdirectories (out/unpack
and out/unminify
) are automatically created within the output directory, in single feature mode, the output files are placed directly in the specified --output
directory without any additional subdirectories.
npm install @wakaru/unpacker @wakaru/unminify
# or
pnpm install @wakaru/unpacker @wakaru/unminify
# or
yarn add @wakaru/unpacker @wakaru/unminify
Usage of wakaru
for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program.