From d0e69fcf1e8dca0554bac0940d57eb9fc7239373 Mon Sep 17 00:00:00 2001 From: Mateus Lino <0daycode@protonmail.com> Date: Tue, 14 Mar 2017 00:23:02 -0300 Subject: [PATCH] Update hatcloud.rb --- hatcloud.rb | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/hatcloud.rb b/hatcloud.rb index 8e08f59..1dd61c5 100644 --- a/hatcloud.rb +++ b/hatcloud.rb @@ -3,6 +3,9 @@ require 'open-uri' require 'json' require 'socket' require 'optparse' +require 'timeout' + + def banner() red = "\033[01;31m" green = "\033[01;32m" @@ -28,13 +31,15 @@ options = {:bypass => nil} parser = OptionParser.new do|opts| opts.banner = "Exemple: ruby cloudhat.rb -b or ruby cloudhat.rb --byp " - opts.on('-b ','--byp ', 'Generetor IP for BootNet', String)do |bypass| + opts.on('-b ','--byp ', 'Discorver real IP (bypass cloudflare)', String)do |bypass| options[:bypass]=bypass; end + opts.on('-h', '--help', 'Help') do banner() puts opts + puts "Exemple: ruby cloudhat.rb -b discordapp.com or ruby cloudhat.rb --byp discordapp.com" exit end end @@ -44,22 +49,26 @@ parser.parse! banner() + l = options[:bypass] - - uri = URI ("http://www.crimeflare.com/cgi-bin/cfsearch.cgi") res = Net::HTTP.post_form(uri, 'cfS' => options[:bypass]) + x = res.body y = /(\d*\.\d*\.\d*\.\d*)/.match(x) k = IPSocket.getaddress (options[:bypass]) - puts "[+] Site analise: #{l} " - puts "[+] Ip cloudflare is #{k} " + + puts "[+] Site analysis: #{l} " + puts "[+] IP CloudFlare is #{k} " puts "[+] IP real is #{y}" target = "http://ipinfo.io/#{y}/json" url = URI(target).read json = JSON.parse(url) puts "[+] Hostname: " + json['hostname'] - puts "[+] Cidade: " +json['city'] + puts "[+] City: " +json['city'] puts "[+] Region: " + json['country'] puts "[+] Location: " + json['loc'] puts "[+] Organization: " + json['org'] + + +