Un simple programa para testear proxies
#!usr/bin/ruby
#ProxyTester (C) Doddy Hackman 2011
require 'net/http'
def uso
print "\n[+] proxy.rb <file>\n"
end
def head()
print "\n\n -- == Proxy Tester == --\n\n"
end
def copyright()
print "\n\n(C) Doddy Hackman 2011\n\n"
exit(1)
end
def testar(tengo)
if tengo=~/(.*):(.*)/
host = $1
port = $2
begin
new = Net::HTTP.new(proxy=host,proxy_port=port)
code = new.get("http://127.0.0.1/sql.php")#http://www.petardas.com
case code
when Net::HTTPSuccess
print "[Proxy Found] : #{host}:#{port}\n"
end
rescue
end
end
end
head()
if !ARGV[0]
uso()
else
archivo = File.open(ARGV[0])
print "\n[+] Scanning file\n\n\n"
lineas = archivo.readlines
lineas.each {
|linea|
linea = linea.chomp
testar(linea) #funcion
}
archivo.close
copyright()
end
copyright()
# ¿ The End ?