内网嗅探自我保护用到的批处理

检测管理员上线就注销自已:

@echo off

 :check

 choice /C YN /T 10 /D Y

 quser find "#16"   && del xx.bat logoff

 goto check 

   #16 每次运行这个 bat 的时候先quser 一下,看当前的会话id 是多少,然后加1 每连接一次就会加1。以上适应使用管理员帐号时。

-------------------------------------------   

下面适应使用拥有管理员权限的其他帐号: 

@echo off

logoff 1

  del log.bat

logoff后面的1改成自己登陆的ID号,用query user查看

还有一个是防止嗅探过程中把服务器挂掉

 @rem pinggw.bat Createdby Icerain

 @echo off

echo ping...

 :ping

ping 127.0.0.1 -n 20>nul

ping -n 1 192.168.1.1 |find "Reply"

if %ERRORLEVEL%==0 goto :ping

else goto :taskkill

:taskkill

taskkill /f /im Cain.exe

end

-----------------------------------

手动观察丢包率防止当机:

ping www.r00ts.info

IF ERRORLEVEL 1 GOTO reboot

IF ERRORLEVEL 0 GOTO ping

:reboot   

shutdown /r /t 0   

如果看到丢包率超过10%就要注意了

posted on 2011-11-18 09:55  0xcc  阅读(233)  评论(0编辑  收藏  举报

导航