Skip to content

Commit

Permalink
Prepared for the Fourth Initial Release [v0.0.4]!
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBinitGhimire committed Feb 4, 2021
1 parent a5a3a47 commit 46d8900
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 48 deletions.
52 changes: 26 additions & 26 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
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"]
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<!-- NtHiM | Now, the Host is Mine! - Super Fast Sub-domain Takeover Detection! -->

<p align="center">
<a href="https://github.com/TheBinitGhimire/NtHiM/stargazers" target="_blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/TheBinitGhimire/NtHiM?style=for-the-badge" /></a>
<a href="https://github.com/TheBinitGhimire/NtHiM/stargazers" target="_blank"><img alt="GitHub Stars" src="https://img.shields.io/github/stars/TheBinitGhimire/NtHiM?style=for-the-badge" /></a>
&nbsp;&nbsp;&nbsp;
<a href="https://github.com/TheBinitGhimire/NtHiM/network/members" target="_blank"><img alt="GitHub stars" src="https://img.shields.io/github/forks/TheBinitGhimire/NtHiM?style=for-the-badge" /></a>
<a href="https://github.com/TheBinitGhimire/NtHiM/network/members" target="_blank"><img alt="GitHub Forks" src="https://img.shields.io/github/forks/TheBinitGhimire/NtHiM?style=for-the-badge" /></a>
&nbsp;&nbsp;&nbsp;
<a href="https://github.com/TheBinitGhimire/NtHiM/issues" target="_blank"><img alt="GitHub issues" src="https://img.shields.io/github/issues/TheBinitGhimire/NtHiM?style=for-the-badge" /></a>
<a href="https://github.com/TheBinitGhimire/NtHiM/issues" target="_blank"><img alt="GitHub Issues" src="https://img.shields.io/github/issues/TheBinitGhimire/NtHiM?style=for-the-badge" /></a>
<br />
<img src="images/header.png" alt="Now, the Host is Mine! - Super Fast Sub-domain Takeover Detection" title="NtHiM | Now, the Host is Mine!">
<br />
&nbsp;&nbsp;&nbsp;
<a href="https://github.com/TheBinitGhimire/NtHiM/releases" target="_blank"><img src="https://img.shields.io/github/downloads/TheBinitGhimire/NtHiM/total.svg?style=for-the-badge&label=GitHub+Downloads" /></a>
<a href="https://github.com/TheBinitGhimire/NtHiM/releases" target="_blank"><img alt="GitHub Downloads" src="https://img.shields.io/github/downloads/TheBinitGhimire/NtHiM/total.svg?style=for-the-badge&label=GitHub+Downloads" /></a>
&nbsp;&nbsp;&nbsp;
<a href="https://crates.io/crates/NtHiM" target="_blank"><img alt="Cargo Installs" src="https://img.shields.io/crates/d/NtHiM?style=for-the-badge&label=Cargo+Installs" /></a>
</p>
Expand All @@ -21,7 +21,7 @@

<h3 align="center"> NtHiM - Super Fast Sub-domain Takeover Detection </h3>
<p align="center">
<a href="https://github.com/TheBinitGhimire/NtHiM/releases/tag/0.0.3"><img src="https://img.shields.io/badge/latest-0.0.3-blue?style=for-the-badge&label=Latest+Release" height="36" /></a>
<a href="https://github.com/TheBinitGhimire/NtHiM/releases/tag/0.0.4"><img src="https://img.shields.io/badge/latest-0.0.4-blue?style=for-the-badge&label=Latest+Release" height="36" /></a>
&nbsp;&nbsp;
<a href="https://www.rust-lang.org/" target="_blank"><img src="https://ForTheBadge.com/images/badges/made-with-rust.svg" height="36" /></a>
</p>
Expand Down Expand Up @@ -60,7 +60,7 @@ If you have Cargo installed, you can simply follow the steps below:
| -t | Scan a single target! | NtHiM -t https://example.example.com |
| -f | Scan a list of targets from a file! | NtHiM -f hostnames.txt |
| -c | Number of Concurrent Threads! | NtHiM -c 100 -f hostnames.txt |
| -V | Display the version information! | NtHiM -V |
| -V | Display the version information! | NtHiM -V |

***

Expand Down Expand Up @@ -110,7 +110,7 @@ Some of your queries might have been answered in one of the existing issues, so

## Contributions and Feature Requests
<p align="center">
<a href="https://github.com/TheBinitGhimire/NtHiM/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" /></a>
<a href="https://github.com/TheBinitGhimire/NtHiM/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge" /></a>
</p>


Expand Down
21 changes: 8 additions & 13 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(&[
Expand Down Expand Up @@ -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) => {
Expand All @@ -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(())
}

0 comments on commit 46d8900

Please sign in to comment.