1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use std::path::PathBuf;
use clap::{ArgGroup, Parser};
#[derive(Parser, Debug)]
#[command(name = "sub-solver")]
pub struct Args {
#[clap(flatten)]
pub ciphertext: Ciphertext,
#[arg(short, long)]
pub wordlist: Option<String>,
#[arg(short, long)]
pub key: Option<String>,
#[arg(short = 'F', long)]
pub fill_key: bool,
#[arg(short, long)]
pub no_cache: bool,
}
#[derive(Parser, Debug)]
#[clap(group = ArgGroup::new("ciphertext").required(true).multiple(false))]
pub struct Ciphertext {
#[clap(group = "ciphertext", short, long)]
pub string: Option<String>,
#[clap(group = "ciphertext", short, long)]
pub file: Option<PathBuf>,
}