- 帖子
- 183
- 积分
- 384
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2008-12-19
|
47楼
发表于 2021-7-22 22:59
| 只看该作者
回复 48# idwma
@echo off
netsh advfirewall set domainprofile firewallpolicy blockinbound,blockoutbound
netsh advfirewall set privateprofile firewallpolicy blockinbound,blockoutbound
netsh advfirewall set publicprofile firewallpolicy blockinbound,blockoutbound
netsh advfirewall firewall add rule name="允许所有" dir=out action=allow enable=yes
:loop
set/a n+=1
ping -n 6 127.0.1 >nul
echo 已断开%n%
netsh advfirewall firewall add rule name="阻断一次" dir=out action=block program="d:\阻断一次.exe" enable=yes
ping -n 9 127.0.1 >nul
echo 已连接%n%
netsh advfirewall firewall delete rule name="阻断一次"
goto :loop
如果只允许AAA.exe联网,而阻断和放行其他所有联网的话怎么修改? |
|