When the detection administrator goes online, he or she will log out:
@ Echo off
: Check
Choice/c yn/T 10/D Y
Quser find "#16" & del xx. bat logoff
Goto check
#16 each time you run this bat, you should first quser to check the current session id, and then add 1 to each connection. The above is applicable to the use of the administrator account.
-------------------------------------------
The following describes how to use other accounts with administrator permissions:
@ Echo off
Logoff 1
Del log. bat
Change 1 after logoff to the login ID, and use query user to view
Another is to prevent the server from being crashed during the sniffing process:
@ 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
-----------------------------------
Manually observe the packet loss rate to prevent on-premises servers:
: Ping
Choice/c yn/T 120/D Y
Ping www.2cto.com
If errorlevel 1 GOTO reboot
If errorlevel 0 GOTO ping
: Reboot
Shutdown/r/t 0
If the packet loss rate exceeds 10%, pay attention to it.