Files

8 lines
254 B
Batchfile
Raw Permalink Normal View History

@echo off
setlocal enabledelayedexpansion
set "IPLIST=blacklist.txt"
for /f "usebackq delims=" %%i in ("%IPLIST%") do (
set "ip=%%i"
netsh advfirewall firewall add rule name="Block_!ip!" dir=in action=block remoteip="!ip!"
)
echo 完成。