webcrack-unpack
v1.0.2
Published
CLI tool to unpack JavaScript files using webcrack with parallel processing
Downloads
12
Maintainers
Readme
Webcrack Unpack
A TypeScript CLI tool to unpack JavaScript files using webcrack with parallel processing.
Features
- Parallel Processing: Process multiple JavaScript files simultaneously using configurable thread count
- Recursive Scanning: Automatically finds all
.jsand.min.jsfiles 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
Installation
# Install globally via npm
npm install -g webcrack-unpack
# Or use with npx (recommended - no installation required)
npx webcrack-unpack [options]
# Or install locally in your project
npm install webcrack-unpackUsage
webcrack-unpack [source_directory] [output_directory] [options]Arguments
source_directory- Directory to scan for JS files (default: current directory)output_directory- Directory to output unpacked files (default: source_directory/unpacked)
Options
-s, --source <path>- Source directory to scan for JS files-o, --output <path>- Output directory for unpacked files-t, --threads <number>- Number of parallel threads (default: number of CPU cores)-h, --help- Display help information-V, --version- Display version number
Examples
# Process current directory, output to ./unpacked, auto threads
webcrack-unpack
# Process specific directory, output to ./unpacked
webcrack-unpack /path/to/source
# Process with custom output directory and 4 threads
webcrack-unpack /path/to/source /path/to/output --threads 4
# Using options instead of positional arguments
webcrack-unpack --source /path/to/source --output /path/to/output --threads 4
# Mix positional arguments with options
webcrack-unpack /path/to/source --output /path/to/output -t 8
# Use npx without installation
npx webcrack-unpack --source /path/to/source --output /path/to/output -t 8Output
The tool will:
- Scan the source directory recursively for JavaScript files
- Process each file using webcrack to deobfuscate and unpack
- Save results maintaining the original directory structure:
bundle.json→original_filename.jsondeobfuscated.js→original_filename.js- Any additional files created by webcrack
Requirements
- Node.js 16.0.0 or higher
- webcrack library (automatically installed as dependency)
Development
# Clone and install dependencies
git clone <repository>
cd webcrack-unpack
pnpm install
# Build the project
pnpm run build
# Run in development mode
pnpm run dev
# Test the CLI
node dist/index.js --helpContributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
