@@ -48,55 +48,54 @@ Download the latest release from the [releases page](https://github.com/Collapse
4848
4949``` bash
5050# Basic scan of a JAR file
51- collapsescanner path/to/ file.jar
51+ collapsescanner file.jar
5252
5353# Scan a directory for all JAR and class files
54- collapsescanner path/to/ directory
54+ collapsescanner directory
5555
5656# Different detection modes
57- collapsescanner path/to/ file.jar --mode network
58- collapsescanner path/to/ file.jar --mode crypto
59- collapsescanner path/to/ file.jar --mode malicious
60- collapsescanner path/to/ file.jar --mode obfuscation
57+ collapsescanner file.jar --mode network
58+ collapsescanner file.jar --mode crypto
59+ collapsescanner file.jar --mode malicious
60+ collapsescanner file.jar --mode obfuscation
6161
6262# Extract all resources from the JAR
63- collapsescanner path/to/ file.jar --extract
63+ collapsescanner file.jar --extract
6464
6565# Extract all strings from class files
66- collapsescanner path/to/ file.jar --strings
66+ collapsescanner file.jar --strings
6767
6868# Specify output directory
69- collapsescanner path/to/ file.jar --extract --output path/to/ output/dir
69+ collapsescanner file.jar --extract --output output/dir
7070
7171# Export analysis to JSON
72- collapsescanner path/to/ file.jar --json
72+ collapsescanner file.jar --json
7373
7474# Run with 8 processing threads
75- collapsescanner path/to/ file.jar --threads 8
75+ collapsescanner file.jar --threads 8
7676
7777# Path filtering
78- collapsescanner path/to/ file.jar --exclude " assets/**" --exclude " *.log" --find " com/example/*"
78+ collapsescanner file.jar --exclude " assets/**" --exclude " *.log" --find " com/example/*"
7979
8080# Skip specific keywords
81- collapsescanner path/to/ file.jar --ignore-suspicious path/to/ignored_keywords.txt --ignore-crypto path/to/ignored_crypto .txt
81+ collapsescanner file.jar --ignore_keywords_file ignore_keywords .txt
8282```
8383
8484## 🔍 Command-line Options
8585
86- | Option | Description |
87- | --------------------- | ----------------------------------------------------------------------------------- |
88- | ` path ` | Path to a JAR file, class file, or directory to scan |
89- | ` --mode ` | Detection mode: ` network ` , ` crypto ` , ` malicious ` , ` obfuscation ` , or ` all ` (default) |
90- | ` --extract ` | Extract all resources from JAR files |
91- | ` --strings ` | Extract all strings from class files |
92- | ` --output ` | Specify the output directory (default: ./extracted) |
93- | ` --json ` | Export results in JSON format |
94- | ` -v, --verbose ` | Enable verbose output (shows size/entropy, etc.) |
95- | ` --threads ` | Number of threads to use for parallel processing (0 = automatic based on CPU cores) |
96- | ` --exclude ` | Exclude paths matching the wildcard pattern (can be used multiple times) |
97- | ` --find ` | Only scan paths matching the wildcard pattern (can be used multiple times) |
98- | ` --ignore-suspicious ` | Path to a .txt file with suspicious keywords to ignore (one per line) |
99- | ` --ignore-crypto ` | Path to a .txt file with crypto keywords to ignore (one per line) |
86+ | Option | Description |
87+ | ------------------------ | ----------------------------------------------------------------------------------- |
88+ | ` path ` | Path to a JAR file, class file, or directory to scan |
89+ | ` --mode ` | Detection mode: ` network ` , ` crypto ` , ` malicious ` , ` obfuscation ` , or ` all ` (default) |
90+ | ` --extract ` | Extract all resources from JAR files |
91+ | ` --strings ` | Extract all strings from class files |
92+ | ` --output ` | Specify the output directory (default: ./extracted) |
93+ | ` --json ` | Export results in JSON format |
94+ | ` -v, --verbose ` | Enable verbose output (shows size/entropy, etc.) |
95+ | ` --threads ` | Number of threads to use for parallel processing (0 = automatic based on CPU cores) |
96+ | ` --exclude ` | Exclude paths matching the wildcard pattern (can be used multiple times) |
97+ | ` --find ` | Only scan paths matching the wildcard pattern (can be used multiple times) |
98+ | ` --ignore_keywords_file ` | Path to a .txt file with keywords to ignore (one per line) |
10099
101100## 🛡️ Detection Capabilities
102101
@@ -119,7 +118,7 @@ CollapseScanner analyzes Java class files to find:
119118 - Suspicious character sequences
120119 - Unicode characters in identifiers
121120 - High entropy (potentially obfuscated) files
122- - Custom JVM bytecode detection (0xDEAD magic bytes)
121+ - Custom JVM bytecode detection (unusual magic bytes)
123122
124123## 🛠️ Tools
125124
@@ -131,7 +130,7 @@ CollapseScanner analyzes Java class files to find:
131130
132131``` bash
133132# If running from the source directory
134- cargo run --bin remapper path/to/ input.jar path/to/ output.jar
133+ cargo run --bin remapper input.jar output.jar
135134```
136135
137136#### Example output:
0 commit comments