-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Check for internet - Small adjustments
- Loading branch information
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# v2.0 | ||
- Check for internet | ||
- Small adjustments | ||
|
||
# v1.9 | ||
- Bug fixes | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,11 @@ fn main() -> std::io::Result<()> { | |
let args = App::new("RBust") | ||
.version("v1.9") | ||
.author("inc0gnit0 <[email protected]> | skript0r <[email protected]>") | ||
.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<String> = 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<dyn std::error::Error>> { | ||
Request::head("https://github.com") | ||
.timeout(Duration::new(15, 0)) | ||
.body("")? | ||
.send()?; | ||
|
||
Ok(()) | ||
} |