diff --git a/CHANGELOG.md b/CHANGELOG.md index ae724a5..a05e2f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v2.0 +- Check for internet +- Small adjustments + # v1.9 - Bug fixes diff --git a/README.md b/README.md index 8daa17e..65b8522 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ It is recommended to update once a week `git pull` +`./install.sh` + ## Demo [![asciicast](https://asciinema.org/a/d2drRZkLdcA3YWgBL1ilnVAfD.svg)](https://asciinema.org/a/d2drRZkLdcA3YWgBL1ilnVAfD) diff --git a/src/main.rs b/src/main.rs index 26ab8ce..38ccc67 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,11 +20,11 @@ fn main() -> std::io::Result<()> { let args = App::new("RBust") .version("v1.9") .author("inc0gnit0 | skript0r ") - .about("RBust is a blazing fast web directory bruteforce tool") + .about("Example: ./RBust -u https://example.com -w /home/inc0gnit0/RBust/default.txt") .args_from_usage( " -u, --url=[TARGET_URL] 'Sets your target URL(required)' - -w, --wordlist=[PATH_TO/_WORDLIST] 'Sets your wordlist file(required)' + -w, --wordlist=[PATH_TO_WORDLIST] 'Sets your wordlist file(required)' -t, --timeout=[SECONDS] 'Sets the timeout time in seconds Default(15)' -U, --user-agent=[USER_AGENT] 'Sets the user agent'", ) @@ -62,6 +62,11 @@ fn main() -> std::io::Result<()> { "\x1b[91mSomething went wrong!\nPlease make sure you typed everything right!\x1b[0m" ), } + // Check internet connection + match connection() { + Ok(send) => send, + Err(_) => panic!("\x1b[91mConnection not found!\x1b[0m"), + } // Read file let mut urls: Vec = Vec::new(); let fd = File::open(wordlist)?; @@ -176,3 +181,13 @@ fn url_encode(data: &str) -> String { } return buffer; } + +// Check for internet connection +fn connection() -> Result<(), Box> { + Request::head("https://github.com") + .timeout(Duration::new(15, 0)) + .body("")? + .send()?; + + Ok(()) +}