Β
#HatCloud build in Ruby. It makes bypass in CloudFlare for discover real IP. This can be useful if you need test your server and #website. Testing your protection against Ddos (Denial of Service) or Dos. CloudFlare is services and distributed domain name server #services, sitting between the visitor and the Cloudflare user's hosting provider, acting as a reverse proxy for websites. Your network #protects, speeds up and improves availability for a website or the mobile application with a DNS change.
#Version: 1.0
#Use: ruby hatcloud.rb -h or --help
#ruby hatcloud.rb -b your site
#or
#ruby hatcloud.rb --byp your site
Β
Β
#!/usr/bin/env ruby
# encoding: UTF-8
require 'net/http'
require 'open-uri'
require 'json'
require 'socket'
require 'optparse'
Β
def banner()
red = "\033[01;31m"
green = "\033[01;32m"
Β
Β
puts "\n"
puts"βββ Β βββ ββββββ βββββββββ Β Β ββββββββββ Β Β Β βββββββ βββ Β ββββββββββ "
puts"βββ Β ββββββββββββββββββββ Β Β βββββββββββ Β Β ββββββββββββ Β βββββββββββ"
puts"ββββββββββββββββ Β βββ Β Β Β βββ Β Β βββ Β Β βββ Β ββββββ Β ββββββ Β βββ"
puts"ββββββββββββββββ Β βββ Β Β Β βββ Β Β βββ Β Β βββ Β ββββββ Β ββββββ Β βββ"
puts"βββ Β ββββββ Β βββ Β βββ Β Β Β ββββββββββββββββββββββββββββββββββββββββββ"
puts"βββ Β ββββββ Β βββ Β βββ Β Β Β Β βββββββββββββββ βββββββ Β βββββββ βββββββ "
Β
Β
Β
puts "#{red}Tool for identifying real IP of CloudFlare protected website."
puts "fb.com/hatbashbr/"
puts "github.com/hatbashbr/"
Β
puts "\n"
end
Β
options = {:bypass => nil, :massbypass => nil}
parser = OptionParser.new do|opts|
Β
Β Β opts.banner = "Example: ruby hatcloud.rb -b <your target> or ruby hatcloud.rb --byp <your target>"
Β Β opts.on('-b ','--byp ', 'Discover real IP (bypass CloudFlare)', String)do |bypass|
Β Β options[:bypass]=bypass;
Β Β end
Β
Β Β opts.on('-o', '--out', 'Next release.', String) do |massbypass|
Β Β Β Β options[:massbypass]=massbypass
Β
Β Β end
Β
Β Β opts.on('-h', '--help', 'Help') do
Β Β Β Β banner()
Β Β Β Β puts opts
Β Β Β Β puts "Example: ruby hatcloud.rb -b discordapp.com or ruby hatcloud.rb --byp discordapp.com"
Β Β Β Β exit
Β Β end
end
Β
parser.parse!
Β
Β
banner()
Β
if options[:bypass].nil?
Β Β puts "Insert URL -b or --byp"
else
Β Β option = options[:bypass]
Β Β payload = URI ("http://www.crimeflare.org/cgi-bin/cfsearch.cgi")
Β Β request = Net::HTTP.post_form(payload, 'cfS' => options[:bypass])
Β
Β Β response = Β request.body
Β Β nscheck = /No working nameservers are registered/.match(response)
Β Β if( !nscheck.nil? )
Β Β Β Β puts "[-] No valid address - are you sure this is a CloudFlare protected domain?\n"
Β Β Β Β exit
Β Β end
Β Β regex = /(\d*\.\d*\.\d*\.\d*)/.match(response)
Β Β if( regex.nil? || regex == "" )
Β Β Β Β puts "[-] No valid address - are you sure this is a CloudFlare protected domain?\n"
Β Β Β Β puts "[-] Alternately, maybe crimeflare.org is down? Try it by hand.\n"
Β Β Β Β exit
Β Β end
Β Β ip_real = IPSocket.getaddress (options[:bypass])
Β
Β Β puts "[+] Site analysis: #{option} "
Β Β puts "[+] CloudFlare IP is #{ip_real} "
Β Β puts "[+] Real IP is #{regex}"
Β Β target = "http://ipinfo.io/#{regex}/json"
Β Β url = URI(target).read
Β Β json = JSON.parse(url)
Β Β puts "[+] Hostname: " + json['hostname']
Β Β puts "[+] City: " Β + json['city']
Β Β puts "[+] Region: " + json['country']
Β Β puts "[+] Location: " + json['loc']
Β Β puts "[+] Organization: " + json['org']
Β
end
Comments
0 B
|π
/π
0 B
|π
/π