Last active
August 29, 2015 14:09
-
-
Save dishuostec/d42af59cbc002b192bc2 to your computer and use it in GitHub Desktop.
使用windows系统防火墙拦截劫持ip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
color 1F | |
%windir%\system32\reg.exe query "HKU\S-1-5-19" >nul 2>&1 || ( | |
echo ------- | |
echo *** WARNING *** | |
echo ------- | |
echo. | |
echo ADMINISTRATOR PRIVILEGES NOT DETECTED | |
echo ____________________________________________________________________________ | |
echo. | |
echo This script require administrator privileges. | |
echo. | |
echo To do so, right click on this script and select 'Run as administrator' | |
echo. | |
echo. | |
echo Press any key to exit... | |
pause >nul | |
goto :eof | |
) | |
set NAME=stec_stop_hijack | |
echo 1. delete old rules | |
netsh advfirewall firewall delete rule name="%NAME%" dir=out | |
echo 2. add new rules | |
netsh advfirewall firewall add rule name="%NAME%" dir=out action=block remoteip=27.50.145.6,222.186.57.65,61.163.249.25,116.255.210.44,61.53.143.174,218.29.50.48,61.158.133.74,61.158.133.75,203.171.225.135 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment