繁体   English   中英

Python:写入一个进程的 memory

[英]Python: Writing memory of a process

所以我在编辑过程 memory 时遇到了一些问题。 我通常这样做的方式是手动使用进程黑客 2,它用于查看您电脑上的各种进程,并且对于查找您启动的程序非常有用,无论扩展名如何。

这就是我想要阻止的。 我想通过覆盖在查找它们时弹出的字符串来隐藏我已经运行了一些 exe 的事实,例如:explorer.exe、-s DPS (svchost.exe) 等...)。

您可能需要下载 process hacker 2 以了解我的意思,但如果您已经知道,请回复。

到目前为止,我试图让它发挥作用的尝试都没有成功,我开始失去希望它甚至是可能的。

你可以使用记忆

import memorpy, psutil

cheat_name = "autoclicker.exe" #this is the string we are looking for inside svchost.exe's memory
pids = []

for proc in psutil.process_iter():
    if proc.name() == "svchost.exe":
        pids.append(proc.pid) #we loop through every process to find svchost

for pid in pids:
    mw = memorpy.MemWorker(pid=pid)
    l = [x for x in mw.mem_search(cheat_name)]
    print l
    for string in l:
        string.write(' '*len(cheat_name)*2) #here we replace the cheat's name with spaces
        print "Deleted some strings!"

它基本上循环遍历每个 svchost.exe,搜索 cheat_name 并用空格替换它。 注意:Memorpy 仅支持 python 2.x。 您还必须以管理员身份运行该程序。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM