Skip to content

Commit

Permalink
This is 0.5.0!
Browse files Browse the repository at this point in the history
Use all CPUs by default.
  • Loading branch information
NoraCodes committed Aug 8, 2017
1 parent ca5ce95 commit dd9c3f4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
12 changes: 11 additions & 1 deletion Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "rloris"
version = "0.4.0"
version = "0.5.0"
authors = ["SilverWingedSeraph <[email protected]>"]

[dependencies]
num_cpus = "1"
log = "0.3"
env_logger = "0.4.0"
rustc-serialize = "0.3"
docopt = "0.7"
openssl = "0.9"
openssl = "0.9"
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ extern crate rustc_serialize;
extern crate openssl;
#[macro_use] extern crate log;
extern crate env_logger;
extern crate num_cpus;

use docopt::Docopt;
use std::net::TcpStream;
Expand All @@ -29,7 +30,7 @@ Options:
--cycles=C Total number of additional \"keepalive\" headers to be sent. [default: 10]
--domain=D Override the domain name for SSL connections (e.g., if you're connecting to a raw IP address)
--repeat Perform the attack repeatedly (WARNING - Can produce a DoS condition!)
--threads=T The number of concurrent threads to spin off. [default: 1]
--threads=T The number of concurrent threads to spin off. Defaults to the number of CPUs.
";

#[derive(Debug, RustcDecodable)]
Expand All @@ -42,7 +43,7 @@ struct Args {
flag_nofinalize: bool,
flag_domain: Option<String>,
flag_repeat: bool,
flag_threads: usize,
flag_threads: Option<usize>,
cmd_get: bool,
cmd_post: bool
}
Expand Down Expand Up @@ -87,7 +88,7 @@ fn main() {
let cycles = args.flag_cycles;
let timeout = args.flag_timeout;
let repeat = args.flag_repeat;
let threads = args.flag_threads;
let threads = args.flag_threads.unwrap_or(num_cpus::get());
let ssl = args.flag_ssl;
let cmd_get = args.cmd_get;
let cmd_post = args.cmd_post;
Expand Down

0 comments on commit dd9c3f4

Please sign in to comment.