This program processes collected JavaScript by auto formatting/deobfuscating and concatenating multiple script files in a directory.
This program uses js-beautify as a standalone to do the auto formatting and deobfuscation.
sudo npm -g install js-beautifyYou need a rust toolchain to build this. Build using
cargo build --releaseRun using
cargo run --releasePoint the system folder dialog to the root of the trace data. It will collect and format all js and write the indentation data as csv to indent_profile.csv. For the built in help, run cargo run --release -- --help
If you want to process many traces at a time, run with
cargo run --release -- --projectand point the folder selection to the superdirectory of the trace folders.
To also set the path on the CLI, use the --path flag
cargo run --release -- --project --path="/path/to/my/project folder/"To to activate line length parsing, use the --line_length flag
cargo run --release -- --project --path="/path/to/my/project folder/" --line_lengthOnce compiled it can also be run from the binary directly:
./target/release/js-processor --project --path="../web-evolution/google/" --line_length