elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a Git (Primera Parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Ruby] Proxy Tester
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Ruby] Proxy Tester  (Leído 1,790 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Ruby] Proxy Tester
« en: 16 Octubre 2011, 02:49 am »

Un simple programa para testear proxies

Código
  1. #!usr/bin/ruby
  2. #ProxyTester (C) Doddy Hackman 2011
  3.  
  4. require 'net/http'
  5.  
  6.  
  7. def uso
  8.  print "\n[+] proxy.rb <file>\n"
  9. end
  10.  
  11. def head()
  12.  print "\n\n -- == Proxy Tester == --\n\n"
  13. end
  14.  
  15. def copyright()
  16.   print "\n\n(C) Doddy Hackman 2011\n\n"
  17.   exit(1)
  18. end
  19.  
  20. def testar(tengo)
  21.  
  22. if tengo=~/(.*):(.*)/
  23. host = $1
  24. port = $2
  25. begin
  26.  
  27. new = Net::HTTP.new(proxy=host,proxy_port=port)
  28. code = new.get("http://127.0.0.1/sql.php")#http://www.petardas.com
  29. case code
  30.  when Net::HTTPSuccess
  31.  print "[Proxy Found] : #{host}:#{port}\n"
  32. end
  33. rescue
  34. end
  35. end
  36. end
  37.  
  38.  
  39. head()
  40. if !ARGV[0]
  41.  uso()
  42. else
  43. archivo = File.open(ARGV[0])
  44. print "\n[+] Scanning file\n\n\n"
  45. lineas = archivo.readlines
  46. lineas.each {
  47. |linea|
  48. linea = linea.chomp
  49. testar(linea) #funcion
  50. }
  51. archivo.close
  52. copyright()  
  53. end
  54. copyright()
  55.  
  56. # ¿ The End ?
  57.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Tester
Electrónica
Yasmesita 2 3,548 Último mensaje 24 Abril 2010, 18:19 pm
por Yasmesita
[Python] Proxy Tester
Scripting
BigBear 0 1,775 Último mensaje 16 Octubre 2011, 02:52 am
por BigBear
[Perl] Proxy Tester 0.5
Scripting
BigBear 0 1,786 Último mensaje 12 Mayo 2012, 20:51 pm
por BigBear
[Perl Tk] Proxy Tester 0.5
Scripting
BigBear 0 2,062 Último mensaje 12 Mayo 2012, 20:52 pm
por BigBear
[AYUDA] Tester de password.
Programación Visual Basic
Sink 1 1,585 Último mensaje 19 Junio 2013, 01:03 am
por XresH
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines