[Ruby] Proxy Tester

Iniciado por BigBear, Julio 03, 2011, 09:56:06 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Julio 03, 2011, 09:56:06 PM Ultima modificación: Julio 31, 2014, 10:18:29 PM por Expermicid
Un simple programa para testear proxies

Código: ruby

#!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 ?