Advertisement
Guest User

ds

a guest
Sep 22nd, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. import psutil,os,sys,time
  2. def scan():
  3. mainexe=str
  4. test=[]
  5. p = psutil.Process(pid)
  6. for dll in p.memory_maps():
  7. if dll.path.endswith(name.replace(".exe","")+".exe"):
  8. mainexe=dll.path
  9. if not dll.path.endswith(".exe") and not str(dll.path).find("Windows")==3 and not str(dll.path).find("ProgramData")==3 and not str(dll.path).find("C:\\Program Files\\")==0:
  10. test.append(dll.path)
  11. return test,mainexe
  12.  
  13. def issystemsfile():
  14. standardsizeofcrashhadler=376096
  15. pathofcrashhadler=str
  16. path_file = []
  17. for root, dirs, files in os.walk(scan()[1].replace(name+".exe","")):
  18. for file in files:
  19. if file.endswith(""):
  20. path_file.append(os.path.join(root, file))
  21. result=list(set(scan()[0]) & set(path_file))
  22. result=[item for item in scan()[0] if item not in result]
  23. i=0
  24. length=len(result)
  25. while i!=length:
  26. if str(result[i]).find("cache") != -1:
  27. del result[i]
  28. length = len(result)
  29. continue
  30.  
  31. if str(result[i]).find("Windows") != -1:
  32. del result[i]
  33. length = len(result)
  34. continue
  35.  
  36. length=len(result)
  37. i+=1
  38.  
  39. for i in result:
  40. if str(i).find("Steam")!=-1 and str(i).find("crashhandler.dll")!=-1:
  41. pathofcrashhadler=str(i).replace("crashhandler.dll","")
  42. if standardsizeofcrashhadler!=os.path.getsize(i):
  43. return "mod"
  44. break
  45. else:
  46. path_file = []
  47. for root, dirs, files in os.walk(str(i).replace("crashhandler.dll","")):
  48. for file in files:
  49. if file.endswith(""):
  50. path_file.append(os.path.join(root, file))
  51. result = [item for item in result if item not in path_file]
  52. if result==[]:
  53. return "ok"
  54. break
  55. else:
  56. return result
  57. break
  58. def kill():
  59. for proc in psutil.process_iter():
  60. if proc.name() == name.replace(".exe", "") + ".exe":
  61. print("Закрытие приложения...")
  62. time.sleep(1)
  63. proc.kill()
  64. def find():
  65. for i in range(len(firstscan)):
  66. if issystemsfile()=="ok":
  67. print("\n"*100+"Наблюдаю...")
  68. else:
  69. if issystemsfile()=="mod":
  70. print("Обнаружено изменение в файлах стима")
  71. time.sleep(4)
  72. kill()
  73. sys.exit()
  74. else:
  75. print("Обнаружено внедрение этой длл:",issystemsfile())
  76. time.sleep(4)
  77. kill()
  78. sys.exit()
  79. time.sleep(delay)
  80.  
  81. if __name__ == "__main__":
  82. print("===АНТИ-ЧИТ СЫЩ 0.1===")
  83. time.sleep(1)
  84. name = input("Введите имя процесса: ")
  85. try:
  86. pid = [p.info["pid"] for p in psutil.process_iter(attrs=['pid', 'name']) if name in p.info['name']][0]
  87. except:
  88. print("Ошибка, нет процесса")
  89. sys.exit()
  90. delay = float(input("Введите задержку(в сек.): "))
  91. firstscan = scan()[0]
  92. while True:
  93. find()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement