CLI tool to unpack JavaScript files using webcrack with parallel processing
npm install webcrack-unpackA TypeScript CLI tool to unpack JavaScript files using webcrack with parallel processing.
- Parallel Processing: Process multiple JavaScript files simultaneously using configurable thread count
- Recursive Scanning: Automatically finds all .js and .min.js files in subdirectories
- Smart Output: Preserves directory structure and renames output files appropriately
- Progress Tracking: Real-time progress updates with colored output
- Error Handling: Comprehensive error handling with detailed logging
``bashInstall globally via npm
npm install -g webcrack-unpack
Usage
`bash
webcrack-unpack [source_directory] [output_directory] [options]
`$3
-
source_directory - Directory to scan for JS files (default: current directory)
- output_directory - Directory to output unpacked files (default: source_directory/unpacked)$3
-
-s, --source - Source directory to scan for JS files
- -o, --output - Output directory for unpacked files
- -t, --threads - Number of parallel threads (default: number of CPU cores)
- -h, --help - Display help information
- -V, --version - Display version number$3
`bash
Process current directory, output to ./unpacked, auto threads
webcrack-unpackProcess specific directory, output to ./unpacked
webcrack-unpack /path/to/sourceProcess with custom output directory and 4 threads
webcrack-unpack /path/to/source /path/to/output --threads 4Using options instead of positional arguments
webcrack-unpack --source /path/to/source --output /path/to/output --threads 4Mix positional arguments with options
webcrack-unpack /path/to/source --output /path/to/output -t 8Use npx without installation
npx webcrack-unpack --source /path/to/source --output /path/to/output -t 8
`Output
The tool will:
1. Scan the source directory recursively for JavaScript files
2. Process each file using webcrack to deobfuscate and unpack
3. Save results maintaining the original directory structure:
-
bundle.json → original_filename.json
- deobfuscated.js → original_filename.js
- Any additional files created by webcrackRequirements
- Node.js 16.0.0 or higher
- webcrack library (automatically installed as dependency)
Development
`bash
Clone and install dependencies
git clone
cd webcrack-unpack
pnpm installBuild the project
pnpm run buildRun in development mode
pnpm run devTest the CLI
node dist/index.js --help
``Contributions are welcome! Please feel free to submit a Pull Request.
MIT