obfuskator/crates/noxis/src/main.rs
loki5512344 a641e69455 Initial commit: noxis JVM bytecode obfuscator
Workspace of 9 crates (noxis, noxis-core, noxis-classfile, noxis-analysis,
noxis-passes, noxis-runtime, noxis-jar, noxis-verify, noxis-structure-check).
AGPL-3.0-only license, Rust 2024 edition, unsafe_code denied.
2026-10-08 22:01:03 +02:00

35 lines
1.2 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! CLI обфускатора: `obfuscate`, `analyze`, `patterns`.
use anyhow::Result;
use clap::{Parser, Subcommand};
use noxis::cmd::{analyze, obfuscate, patterns};
/// Обфускатор JVM-байткода на Rust.
#[derive(Debug, Parser)]
#[command(name = "noxis", version, about)]
struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(Debug, Subcommand)]
enum Commands {
/// Обфусцировать jar: конвейер, маппинги, JSON-отчёт.
Obfuscate(obfuscate::Args),
/// Разобрать jar: классы, entrypoint'ы, keep-правила.
Analyze(analyze::Args),
/// Красный список паттернов: показать или прогнать по jar'у.
Patterns(patterns::Args),
}
fn main() -> Result<()> {
tracing_subscriber::fmt()
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.with_writer(std::io::stderr)
.init();
match Cli::parse().command {
Commands::Obfuscate(args) => obfuscate::run(args),
Commands::Analyze(args) => analyze::run(args),
Commands::Patterns(args) => patterns::run(args),
}
}