-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepared for the Fourth Initial Release [v0.0.4]!
- Loading branch information
1 parent
a5a3a47
commit 46d8900
Showing
4 changed files
with
43 additions
and
48 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,13 +1,13 @@ | ||
[package] | ||
name = "NtHiM" | ||
version = "0.0.3" | ||
version = "0.0.4" | ||
authors = ["Binit Ghimire <[email protected]>"] | ||
edition = "2018" | ||
license = "MIT" | ||
categories = ["command-line-utilities"] | ||
description = "Now, the Host is Mine! - Super Fast Sub-domain Takeover Detection!" | ||
homepage = "https://whoisbinit.me/NtHiM/" | ||
documentation = "https://whoisbinit.me/NtHiM/" | ||
documentation = "https://github.com/TheBinitGhimire/NtHiM/" | ||
repository = "https://github.com/TheBinitGhimire/NtHiM/" | ||
readme = "README.md" | ||
keywords = ["host-takeover", "subdomain-takeover", "pentesting", "bug-bounty", "red-teaming"] | ||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ use std::io::{BufRead, BufReader}; | |
|
||
fn main() -> std::io::Result<()> { | ||
let args = App::new("NtHiM") | ||
.version("0.0.3") | ||
.version("0.0.4") | ||
.author("Binit Ghimire <[email protected]>") | ||
.about("Now, the Host is Mine! - Super Fast Sub-domain Takeover Detection!") | ||
.args(&[ | ||
|
@@ -65,13 +65,7 @@ async fn takeover(hosts: Vec<String>, threads: usize) -> std::io::Result<()> { | |
let fetches = futures::stream::iter( | ||
hosts.into_iter().map(|url| { | ||
async move { | ||
match reqwest::Client::builder() | ||
.danger_accept_invalid_certs(true) | ||
.build() | ||
.unwrap() | ||
.get(&url) | ||
.send() | ||
.await { | ||
match reqwest::Client::builder().danger_accept_invalid_certs(true).build().unwrap().get(&url).send().await { | ||
Ok(resp) => { | ||
match resp.text().await { | ||
Ok(text) => { | ||
|
@@ -80,15 +74,16 @@ async fn takeover(hosts: Vec<String>, threads: usize) -> std::io::Result<()> { | |
Err(_) => println!("[{}]\tAn error occured for [{}].", Colour::Green.bold().paint("ERROR"), Colour::White.bold().paint(url)), | ||
} | ||
} | ||
Err(_) => println!("[{}]\tTry passing {} with HTTP/HTTPS!", Colour::Green.bold().paint("ERROR"), Colour::White.bold().paint(url)), | ||
Err(_) => println!("[{}]\tTry passing {} with HTTP/HTTPS!", Colour::Green.bold().paint("ERROR"), Colour::White.bold().paint(url)), | ||
} | ||
} | ||
}) | ||
).buffer_unordered(threads).collect::<Vec<()>>(); | ||
fetches.await; | ||
//let body = res.text().await?; | ||
//if body.contains("<p><strong>There isn't a GitHub Pages site here.</strong></p>") { | ||
//println!("GitHub Pages Sub-domain Takeover seems possible!"); | ||
//} | ||
/* In case you want to know how it works, here is a more simple code: | ||
let body = res.text().await?; | ||
if body.contains("<p><strong>There isn't a GitHub Pages site here.</strong></p>") { | ||
println!("GitHub Pages Sub-domain Takeover seems possible!"); | ||
} */ | ||
Ok(()) | ||
} |