@echo off
eventquery /L application /R 1 /V /FI "ID EQ 521" >a.txt
for /f "tokens=3 delims=****" %%a in (a.txt) do echo.%%a >b.txt
for /f "tokens=1 delims= " %%a in (b.txt) do echo.netsh ipsec static delete filter filterlist=BlockIP dstaddr=me dstport=0 srcaddr=%%a srcport=0 protocol=any mirrored=yes srcmask=255.255.255.255 dstmask=255.255.255.255 >BlockIP.bat
for /f "tokens=1 delims= " %%a in (b.txt) do echo.netsh ipsec static add filter filterlist=BlockIP dstaddr=me dstport=0 srcaddr=%%a srcport=0 protocol=any mirrored=yes srcmask=255.255.255.255 dstmask=255.255.255.255 >>BlockIP.bat
echo.del a.txt >>BlockIP.bat
echo.del b.txt >>BlockIP.bat
echo.del BlockIP.bat >>BlockIP.bat
BlockIP.bat
欢迎光临 邮件服务器-邮件系统-邮件技术论坛(BBS) (http://5dmail.cn/bbs/) | Powered by Discuz! X3.2 |