Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ walkdir = "2.4"
# Process management
which = "6.0"

# Glob pattern matching
glob = "0.3"

# Regex
regex = "1.10"
lazy_static = "1.4"
Expand Down
45 changes: 45 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ pub enum Commands {
#[command(subcommand)]
Daemon(DaemonCommands),

/// Analysis queue for batch binary processing
#[command(subcommand)]
Queue(QueueCommands),

/// Download and setup Ghidra automatically
Setup(SetupArgs),
}
Expand Down Expand Up @@ -815,6 +819,47 @@ pub enum DaemonCommands {
},
}

/// Analysis queue commands for batch binary processing
#[derive(Subcommand, Clone, Serialize, Deserialize, Debug)]
pub enum QueueCommands {
/// Add binaries matching a glob pattern to the analysis queue
Add(QueueAddArgs),

/// List all items in the analysis queue
List,

/// Remove items matching a glob pattern from the queue
Remove(QueueRemoveArgs),

/// Block until all queued analyses are complete
Wait(QueueWaitArgs),
}

#[derive(Args, Clone, Serialize, Deserialize, Debug)]
pub struct QueueAddArgs {
/// Glob pattern(s) matching binaries to analyze (e.g. "./bins/*" or "/usr/bin/ls")
#[arg(required = true)]
pub patterns: Vec<String>,

/// Project name for imported binaries
#[arg(long)]
pub project: Option<String>,
}

#[derive(Args, Clone, Serialize, Deserialize, Debug)]
pub struct QueueRemoveArgs {
/// Glob pattern(s) matching queued paths to remove
#[arg(required = true)]
pub patterns: Vec<String>,
}

#[derive(Args, Clone, Serialize, Deserialize, Debug)]
pub struct QueueWaitArgs {
/// Poll interval in seconds (default: 2)
#[arg(long, default_value = "2")]
pub interval: u64,
}

/// Arguments for the setup command
#[derive(Args, Clone, Serialize, Deserialize, Debug)]
pub struct SetupArgs {
Expand Down
Loading
Loading