Skip to content

Commit

Permalink
More Accurate Platform Definitions, plus some core code changes!
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBinitGhimire committed Jan 27, 2021
1 parent 7b403b7 commit 0b1ff50
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 38 deletions.
42 changes: 21 additions & 21 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "NtHiM"
version = "0.0.2"
version = "0.0.3"
authors = ["Binit Ghimire <[email protected]>"]
edition = "2018"
license = "MIT"
Expand Down
12 changes: 6 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#![allow(non_snake_case, unused_must_use)]
mod platforms;

use std::{process::exit, string::String};
use clap::{Arg, App};
use ansi_term::{Colour};

use futures::{stream, StreamExt};
use reqwest::Client;
use tokio;
use futures::{StreamExt};

use std::fs::File;
use std::io::{BufRead, BufReader};

fn main() -> std::io::Result<()> {
let args = App::new("NtHiM")
.version("0.0.2")
.version("0.0.3")
.author("Binit Ghimire <[email protected]>")
.about("Now, the Host is Mine! - Super Fast Sub-domain Takeover Detection!")
.args(&[
Expand Down Expand Up @@ -71,10 +71,10 @@ async fn takeover(hosts: Vec<String>, threads: usize) -> std::io::Result<()> {
Ok(text) => {
platforms::_platforms(url, text);
}
Err(_) => println!("There was an error during execution."),
Err(_) => println!("[{}]\tAn error occured for [{}].", Colour::Green.bold().paint("ERROR"), Colour::White.bold().paint(url)),
}
}
Err(_) => println!("There was an error during execution."),
Err(_) => println!("[{}]\tTry passing {} with HTTP/HTTPS!", Colour::Green.bold().paint("ERROR"), Colour::White.bold().paint(url)),
}
}
})
Expand Down
20 changes: 10 additions & 10 deletions src/platforms.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use ansi_term::{Colour, Style};
use ansi_term::{Colour};
use serde_derive::Deserialize;

#[derive(Deserialize)]
Expand Down Expand Up @@ -70,7 +70,7 @@ pub fn _platforms(url: String, response: String) -> serde_json::Result<()> {
},
{
"platform": "Heroku",
"content": "No such app"
"content": "<title>No such app</title>"
},
{
"platform": "Intercom",
Expand All @@ -82,7 +82,7 @@ pub fn _platforms(url: String, response: String) -> serde_json::Result<()> {
},
{
"platform": "Kinsta",
"content": "No Site For Domain"
"content": "You have successfully pointed this domain to Kinsta servers but you haven't added it to any of your sites."
},
{
"platform": "LaunchRock",
Expand All @@ -102,27 +102,27 @@ pub fn _platforms(url: String, response: String) -> serde_json::Result<()> {
},
{
"platform": "Readme.io",
"content": "Project doesnt exist... yet!"
"content": "<h2>Project doesnt exist... yet!</h2>"
},
{
"platform": "Shopify",
"content": "Sorry, this shop is currently unavailable."
"content": "<h1 class=\"tc\">Sorry, this shop is currently unavailable.</h1>"
},
{
"platform": "SmartJobBoard",
"content": "This job board website is either expired or its domain name is invalid."
},
{
"platform": "Strikingly",
"content": "page not found"
"content": "<title>Page not found - Strikingly</title>"
},
{
"platform": "Surge.sh",
"content": "project not found"
"content": "<h1>project not found</h1>"
},
{
"platform": "Tumblr",
"content": "Whatever you were looking for doesn't currently exist at this address"
"content": "Whatever you were looking for doesn't currently exist at this address. Unless you were looking for this error page, in which case: Congrats! You totally found it."
},
{
"platform": "Uberflip",
Expand All @@ -138,11 +138,11 @@ pub fn _platforms(url: String, response: String) -> serde_json::Result<()> {
},
{
"platform": "Webflow",
"content": "The page you are looking for doesn't exist or has been moved."
"content": "<p class=\"description\">The page you are looking for doesn't exist or has been moved.</p>"
},
{
"platform": "Worksites",
"content": "Hello! Sorry, but the website you&rsquo;re looking for doesn&rsquo;t exist."
"content": "<p>Hello! Sorry, but the website you&rsquo;re looking for doesn&rsquo;t exist.</p>"
}
]
}"#;
Expand Down

0 comments on commit 0b1ff50

Please sign in to comment.