Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'socket'
- Gem.win_platform? ? (system "cls") : (system "clear")
- puts "
- ____ _____ _
- | _ \\ / ____| | |
- | |_) | __ _ _ __ _ __ ___ _ __| | __ _ __ __ _| |__
- | _ < / _` | '_ \\| '_ \\ / _ \\ '__| | |_ | '__/ _` | '_ \\
- | |_) | (_| | | | | | | | __/ | | |__| | | | (_| | |_) |
- |____/ \\__,_|_| |_|_| |_|\\___|_| \\_____|_| \\__,_|_.__/ ~ by AnonGuy" # [ blog.lolwaleet.com ] -- [ an0nguy @ protonmail.ch ]
- print "\nURL -- > "
- url = gets.chomp.chomp('/').sub(/^https?\:\/\/(www.)?/, '')
- separator = '-----------------------------------------------------------------------'
- counter = 0
- puts separator
- begin
- Socket.gethostbyname(url)
- rescue SocketError
- abort("Error! -- Can't find #{url}!\n#{separator}")
- end
- sckt = TCPSocket.open(url, 80)
- sckt.puts "HEAD / HTTP/1.1"
- sckt.puts "Host: #{url}"
- sckt.puts "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"
- sckt.puts "Connection: close\n\n"
- headers = sckt.recv(500).rstrip
- sckt.close
- puts headers
- puts separator
- array = {'Server' => '[!] Server header found!', 'X-Generator' => '[!] X-Generator header found!', 'X-Powered-By' => '[!] X-Powered-By header found!', 'zope3' => '[!] Zope framework in use!', 'CAKEPHP' => '[!] CakePHP framework in use!', 'kohanasession' => '[!] Kohana framework in use!', 'X-AspNet-Version' => '[!] ASP.NET framework in use!', 'laravel_session' => '[!] Laravel framework in use!', '__cfduid' => '[!] Site is behind CloudFlare!', 'ns_af' => '[!] Site is behind Citrix Netscaler WAF!', 'Joomla' => '[!] Site is using Joomla!', 'Drupal' => '[!] Site is using Drupal!', 'X-Pingback' => '[!] Site is running Wordpress!'}
- array.each_pair do |key, description|
- if headers.include?(key)
- counter += 1
- puts "#{counter} -- #{description}"
- end
- end
- print separator
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement