Skip to content

Commit 59d405e

Browse files
committed
v2.0
- Check for internet - Small adjustments
1 parent 0cd476a commit 59d405e

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v2.0
2+
- Check for internet
3+
- Small adjustments
4+
15
# v1.9
26
- Bug fixes
37

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ It is recommended to update once a week
4848

4949
`git pull`
5050

51+
`./install.sh`
52+
5153
## Demo
5254

5355
[![asciicast](https://asciinema.org/a/d2drRZkLdcA3YWgBL1ilnVAfD.svg)](https://asciinema.org/a/d2drRZkLdcA3YWgBL1ilnVAfD)

src/main.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ fn main() -> std::io::Result<()> {
2020
let args = App::new("RBust")
2121
.version("v1.9")
2222
.author("inc0gnit0 <iinc0gnit0@pm.me> | skript0r <skript0r@protonmail.com>")
23-
.about("RBust is a blazing fast web directory bruteforce tool")
23+
.about("Example: ./RBust -u https://example.com -w /home/inc0gnit0/RBust/default.txt")
2424
.args_from_usage(
2525
"
2626
-u, --url=[TARGET_URL] 'Sets your target URL(required)'
27-
-w, --wordlist=[PATH_TO/_WORDLIST] 'Sets your wordlist file(required)'
27+
-w, --wordlist=[PATH_TO_WORDLIST] 'Sets your wordlist file(required)'
2828
-t, --timeout=[SECONDS] 'Sets the timeout time in seconds Default(15)'
2929
-U, --user-agent=[USER_AGENT] 'Sets the user agent'",
3030
)
@@ -62,6 +62,11 @@ fn main() -> std::io::Result<()> {
6262
"\x1b[91mSomething went wrong!\nPlease make sure you typed everything right!\x1b[0m"
6363
),
6464
}
65+
// Check internet connection
66+
match connection() {
67+
Ok(send) => send,
68+
Err(_) => panic!("\x1b[91mConnection not found!\x1b[0m"),
69+
}
6570
// Read file
6671
let mut urls: Vec<String> = Vec::new();
6772
let fd = File::open(wordlist)?;
@@ -176,3 +181,13 @@ fn url_encode(data: &str) -> String {
176181
}
177182
return buffer;
178183
}
184+
185+
// Check for internet connection
186+
fn connection() -> Result<(), Box<dyn std::error::Error>> {
187+
Request::head("https://github.com")
188+
.timeout(Duration::new(15, 0))
189+
.body("")?
190+
.send()?;
191+
192+
Ok(())
193+
}

0 commit comments

Comments
 (0)