KhaosBringer icon

Cloudflare Resolver.rb

KhaosBringer | PRO | 11/26/18 09:15:59 PM UTC | 0 ⭐ | 8521 πŸ‘οΈ | Never ⏰ | []
Ruby |

3.85 KB

|

None

|

0 πŸ‘

/

0 πŸ‘Ž

Β 
#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

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž