Smarter error checking per Issue 10

master
Joe Barrett 2017-09-28 10:07:55 -04:00
parent b75b45e148
commit 8eb386cc63
1 changed files with 10 additions and 0 deletions

View File

@ -64,7 +64,17 @@ else
request = Net::HTTP.post_form(payload, 'cfS' => options[:bypass]) request = Net::HTTP.post_form(payload, 'cfS' => options[:bypass])
response = request.body 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) 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]) ip_real = IPSocket.getaddress (options[:bypass])
puts "[+] Site analysis: #{option} " puts "[+] Site analysis: #{option} "