Skip to content

Commit 3e89418

Browse files
committed
GUI
1 parent 80fc122 commit 3e89418

14 files changed

Lines changed: 5485 additions & 666 deletions

File tree

Cargo.lock

Lines changed: 4375 additions & 621 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,28 @@ edition = "2021"
55
authors = ["dest4590"]
66
default-run = "collapsescanner"
77

8+
[[bin]]
9+
name = "collapsescanner"
10+
path = "src/main.rs"
11+
required-features = []
12+
813
[[bin]]
914
name = "remapper"
1015
path = "scripts/remapper.rs"
1116

17+
[features]
18+
default = ["cli"]
19+
cli = ["clap", "colored"]
20+
gui = ["iced", "rfd", "tokio"]
21+
1222
[dependencies]
13-
colored = "3.0.0"
1423
regex = "1.12.2"
1524
zip = "6.0.0"
1625
indicatif = "0.18.2"
1726
lazy_static = "1.5.0"
1827
url = "2.5.7"
1928
hex = "0.4.3"
2029
byteorder = "1.5.0"
21-
clap = { version = "4.5.51", features = ["derive"] }
2230
walkdir = "2.5.0"
2331
serde = { version = "1.0.228", features = ["derive"] }
2432
serde_json = "1.0.145"
@@ -32,6 +40,15 @@ sysinfo = "0.37.2"
3240
bloomfilter = "3.0"
3341
ipnet = "2"
3442

43+
# CLI dependencies (optional)
44+
colored = { version = "3.0.0", optional = true }
45+
clap = { version = "4.5.51", features = ["derive"], optional = true }
46+
47+
# GUI dependencies (optional)
48+
iced = { version = "0.13", features = ["tokio"], optional = true }
49+
rfd = { version = "0.15", optional = true }
50+
tokio = { version = "1", features = ["full"], optional = true }
51+
3552
[profile.release]
3653
codegen-units = 1
3754
opt-level = "z"

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
- **Performance optimizations** 🚀:
2222

2323
- **Multi-threading**: Parallel processing of files for faster scanning
24-
- **Fast mode**: Stop processing after first suspicious item
2524
- **Path filtering**: Include or exclude paths matching patterns
2625
- **Custom ignore lists**: Skip specified suspicious keywords
2726

scripts/remapper.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ fn process_jar(input_path: &str, output_path: &str) -> ZipResult<()> {
6666
if entry.size() > 1_000_000 && !is_dir {
6767
let temp_path = temp_dir.path().join(i.to_string());
6868
{
69-
let mut temp_file =
70-
File::create(&temp_path).map_err(zip::result::ZipError::Io)?;
69+
let mut temp_file = File::create(&temp_path).map_err(zip::result::ZipError::Io)?;
7170
io::copy(&mut entry, &mut BufWriter::new(&mut temp_file))
7271
.map_err(zip::result::ZipError::Io)?;
7372
}

src/filters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ lazy_static::lazy_static! {
1616
\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»""']))"#).unwrap();
1717

1818
/// Generic malicious / suspicious pattern keywords
19-
pub static ref MALICIOUS_PATTERN_REGEX: Regex = Regex::new(r"(?i)\b(payload|powershell|cmd\.exe|Runtime\.getRuntime\(\)\.exec|ProcessBuilder|loadLibrary|socket\(|bind\(|connect\(|URL\(|URLConnection|Class\.forName|defineClass|getMethod|jndi|ldap|rmi)\b").unwrap();
19+
pub static ref MALICIOUS_PATTERN_REGEX: Regex = Regex::new(r"(?i)\b(powershell|cmd\.exe|Runtime\.getRuntime\(\)\.exec|ProcessBuilder|loadLibrary|socket\(|bind\(|connect\(|URL\(|URLConnection|Class\.forName|defineClass|getMethod|ldap|rmi)\b").unwrap();
2020

2121
/// Known "good" links / domains
2222
pub static ref GOOD_LINKS: Vec<String> = vec![

0 commit comments

Comments
 (0)