• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Ruby [Ruby] Proxy Tester

Status
Not open for further replies.

Doddy

Leech
User
Joined
Apr 1, 2012
Messages
169
Reputation
0
Reaction score
406
Points
63
Credits
0
‎13 Years of Service‎
57%
Un simple programa para testear proxies

Code:
>
#!usr/bin/ruby
#ProxyTester (C) Doddy Hackman 2011

require 'net/http'


def uso
 print "\n[+] proxy.rb \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://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 ?
 
Status
Not open for further replies.
Back
Top