Board logo

标题: 老话题,进程结束器 [打印本页]

作者: xinhepc     时间: 2007-12-5 12:24    标题: 老话题,进程结束器

没有任何技术含量,发只来方便一下,哈哈




@Echo Off
mode con lines=13 cols=60
rem -------------------------------------------------------------------
rem Welcome to my blog --- http://http://blog.sina.com.cn/qq78079183
rem -------------------------------------------------------------------
title 进程结束器
:rest
@ color 07
cls
echo.
echo.
echo     如果按 1 ,则进入普通模式,可结束一般进程。
echo.
echo     如果按 2 ,则进入高级模式,可结束大多数进程。(慎用)
echo.
echo     退出请按 Q 回车!
echo.
echo.
echo                                       
echo.
Set /p file=请选择:
if /i "%file%"=="q" exit
If /I "%file%"=="1" goto 1
if /i "%file%"=="2" goto 2
if /i "%file%"=="blog" goto blog


:1
cls
@ color 0a
echo.
echo.
echo     您用的是普通模式,请输入进程名然后回车,例如QQ.exe
echo.
echo     返回主菜单请回车
echo.
echo.
echo.
echo.
echo.
Set /p xinhepc0=请输入进程名:
If /I "%xinhepc0%"=="" goto rest
start cmd /c taskkill /im %xinhepc0% /f

Goto rest


:2
cls
@ color 0c
echo.
echo.
echo   请注意,您现在使用了高级模式,如果操作不当,系统可能崩溃
echo   请输入进程名然后回车,例如winlogon.exe
echo.   
echo   返回主菜单请回车
echo.
echo.
echo.
echo.
Set /p xinhepc=请输入进程名:
If /I "%xinhepc%"=="" goto rest
start cmd /c ntsd -c q -pn %xinhepc%

Goto rest
作者: nanhui112     时间: 2007-12-24 13:45
最好还是 加入'tasklist'    不是所有都能随便结束的  system idle process    system   csrss.exe   winlogon.exe
作者: arden     时间: 2008-7-19 13:32
这个批处理非常的不错的,已经下载使用了。
作者: 523066680     时间: 2008-7-21 15:33    标题: 额……

这个批处理我没发帖 不过  我看H网的时候常用来防止病毒进程的:
一下代码是适用于某网吧的
@echo off
for /f "skip=10" %%a in ('type %~nx0') do (
if not exist oldlist\%%a (md oldlist\%%a)
)
:action
for /f "skip=1" %%a in ('tasklist /nh') do (
if not exist oldlist\%%a (taskkill /t /f /im %%a &echo.%%a>>keyi.x)
)
ping -n 2 127.0>nul
goto action
System
smss.exe
csrss.exe
winlogon.exe
services.exe
lsass.exe
svchost.exe
svchost.exe
svchost.exe
explorer.exe
dllhost.exe
CltSrv.exe
nvsvc32.exe
svchost.exe
dmadmin.exe
Clsmn.exe
VM_STI.EXE
internat.exe
conime.exe
IEXPLORE.EXE
Thunder5.exe
QQ.exe
TIMPlatform.exe
Qzone.exe
PinyinUp.exe
notepad.exe
cmd.exe
cmd.exe
tasklist.exe
rundll32.exe
wmiprvse.exe
winrar.exe
wmplayer.exe

TXPlatform.exe









System
smss.exe
csrss.exe
winlogon.exe
SERVICES.EXE
LSASS.EXE
SVCHOST.EXE
SVCHOST.EXE
CCenter.exe
SVCHOST.EXE
SVCHOST.EXE
SVCHOST.EXE
RavMonD.exe
RavStub.exe
spoolsv.exe
stormliv.exe
wdfmgr.exe
alg.exe
SVCHOST.EXE
EXPLORER.EXE
RavMon.exe
SOUNDMAN.EXE
RavTask.exe
Thunder5.exe
RSTray.exe
360tray.exe
ctfmon.exe
conime.exe
RsAgent.exe
AgentSvr.exe
iexplore.exe
cmd.exe
QQ.exe
TXPlatform.exe
tasklist.exe
wmiprvse.exe


iepro.exe
EQSysSecure.exe
srgui.exe
作者: laohiog     时间: 2008-7-24 21:50


  Quote:
Originally posted by 523066680 at 2008-7-21 03:33 PM:
这个批处理我没发帖 不过  我看H网的时候常用来防止病毒进程的:
一下代码是适用于某网吧的
@echo off
for /f "skip=10" %%a in ('type %~nx0') do (
if  ...

你好,请问它的原理是什么?如果是家中使用的要如何修改?
作者: 523066680     时间: 2008-7-25 11:37
额……原理,把安全时候进程名全都建立成同名的文件夹
例如   cmd.exe  ping.exe 文件夹,这都为接下来的对比提供了方便的
我建立了所有平常使用的进程名的文件夹,然后
比如出现了异常进程(假如病毒是用同名的进程我就没辙啦)
这个命令起到重要作用:if not exist ……如果进程中存在进程a.exe,而目录名里面没有这个名称,那么可以判断他是新产生的。 该批处理会把它结束掉


这个批处理也不是很好,不过H网病毒太泛滥了几秒钟能结掉十几个进程
我才用这个的。这种情况下才体现这个批处理的优势。其他情况就……


还有,后面的进程列表应该要是系统常用的 安全的进程名称!可以自己添加
常用的进程
作者: laohiog     时间: 2008-7-25 13:38
哦,晓得了,谢谢。