Fixing cloudhat/hatcloud in error messages

master
Joe Barrett 2017-09-28 10:04:18 -04:00
parent 98cedf99f9
commit b75b45e148
1 changed files with 19 additions and 19 deletions

View File

@ -33,7 +33,7 @@ end
options = {:bypass => nil, :massbypass => nil}
parser = OptionParser.new do|opts|
opts.banner = "Example: ruby cloudhat.rb -b <your target> or ruby cloudhat.rb --byp <your target>"
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
@ -46,7 +46,7 @@ parser = OptionParser.new do|opts|
opts.on('-h', '--help', 'Help') do
banner()
puts opts
puts "Example: ruby cloudhat.rb -b discordapp.com or ruby cloudhat.rb --byp discordapp.com"
puts "Example: ruby hatcloud.rb -b discordapp.com or ruby hatcloud.rb --byp discordapp.com"
exit
end
end
@ -59,24 +59,24 @@ 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])
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
regex = /(\d*\.\d*\.\d*\.\d*)/.match(response)
ip_real = IPSocket.getaddress (options[:bypass])
response = request.body
regex = /(\d*\.\d*\.\d*\.\d*)/.match(response)
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']
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