You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/error.rs
-3Lines changed: 0 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,6 @@ pub enum ArgError {
16
16
/// This error is raised if the user doesn't specify any argument.
17
17
#[error("Error: no argument specified\nUsage: worgenX <command> [options]\nTry 'worgenX --help' for more information.")]
18
18
NoArgument,
19
-
/// This error is raised if the user specifies an argument that requires a value but doesn't give it.
20
-
#[error("Error: missing value for {0}")]
21
-
MissingValue(String),
22
19
/// This error is raised if there isn't any configuration given by the user (for example just wordlist feature without any type of characters specified).
23
20
#[error("Error: no configuration given for argument.\nPlease specify the mandatory parameters and at least one type of characters.\nUsage: worgenX <command> [options]\nTry 'worgenX --help' for more information.")]
/// This struct is built from the arguments for the benchmark feature.
38
38
///
39
39
structBenchmarkOptions{
40
-
threads:u8,
40
+
threads:usize,
41
41
}
42
42
43
43
/// This function is responsible for building the command context of the CLI mode with the clap framework.
@@ -47,7 +47,7 @@ struct BenchmarkOptions {
47
47
/// Command struct containing the different features of WorgenX.
48
48
///
49
49
fnbuild_command_context() -> Command{
50
-
let default_threads:&'staticstr = Box::leak(num_cpus::get_physical().to_string().into_boxed_str());// Ensure a static reference to the number of physical cores of the CPU
50
+
let default_threads:&'staticstr = Box::leak(num_cpus::get().to_string().into_boxed_str());// Ensure a static reference to the number of logical cores of the CPU
51
51
let wordlist_command:Command = Command::new("wordlist")
println!("\n The following options are optional:");
542
546
println!(" -d, --disable-loading-bar\t\tDisable the loading bar when generating the wordlist");
543
547
println!(" -h, --hash <hash>\t\t\tHash algorithm to use for the wordlist.\n\t\t\t\t\tYou can choose between: md5, sha1, sha224, sha256, sha384, sha512,\n\t\t\t\t\tsha3-224, sha3-256, sha3-384, sha3-512, blake2b-512, blake2s-256 and whirlpool");
544
-
println!(" -t <threads>, --threads <threads>\tNumber of threads to generate the passwords\n\t\t\t\t\tBy default, the number of threads is based on the number of physical cores of the CPU");
548
+
println!(" -t <threads>, --threads <threads>\tNumber of threads to generate the passwords\n\t\t\t\t\tBy default, the number of threads is based on the number of logical cores of the CPU");
545
549
546
550
println!("\n --- Password generation ---");
547
551
println!(" You must specify at least one of the following options: -l, -u, -n, -x");
@@ -559,7 +563,7 @@ fn display_help() {
559
563
560
564
println!("\n --- CPU Benchmark ---");
561
565
println!(" The following option is optional:");
562
-
println!(" -t <threads>, --threads <threads>\tNumber of threads to use for the CPU benchmark\n\t\t\t\t\tBy default, the number of threads is based on the number of physical cores of the CPU\n");
566
+
println!(" -t <threads>, --threads <threads>\tNumber of threads to use for the CPU benchmark\n\t\t\t\t\tBy default, the number of threads is based on the number of logical cores of the CPU\n");
563
567
}
564
568
565
569
#[cfg(test)]
@@ -592,7 +596,7 @@ mod tests {
592
596
let result:WordlistGenerationOptions = allocate_wordlist_config_cli(sub_matches).unwrap();
0 commit comments