@echo off
color 1f
title 關閉常見的危險端口
echo.
echo.
echo 本批處理用於啟動XP系統的防火牆並關閉常見的危險端口
echo.
echo 請確認您正在使用的是XP系統 並且未安裝其他防火牆
echo.
echo 以避免與XP系統的防火牆發生沖突
echo.
echo.
echo.
pause
cls
echo 正在啟動防火牆 請稍候...
sc config SharedAccess start= auto>>nul
net start SharedAccess>>nul
echo 防火牆已經成功啟動
echo.
echo 正在關閉常見的危險端口 請稍候...
echo.
echo 正在關閉135端口 請稍候...
netsh firewall set portopening protocol = ALL port = 135 name = 135 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉137端口 請稍候...
netsh firewall set portopening protocol = ALL port = 137 name = 137 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉138端口 請稍候...
netsh firewall set portopening protocol = ALL port = 138 name = 138 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉139端口 請稍候...
netsh firewall set portopening protocol = ALL port = 139 name = 139 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉445端口 請稍候...
netsh firewall set portopening protocol = ALL port = 445 name = 445 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉593端口 請稍候...
netsh firewall set portopening protocol = TCP port = 593 name = 593 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉1025端口 請稍候...
netsh firewall set portopening protocol = TCP port = 1025 name = 1024 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉3389端口 請稍候...
netsh firewall set portopening protocol = ALL port = 3389 name = 3389 mode = DISABLE scope = ALL profile = ALL
cls
echo.
echo.
echo.
echo 常見的危險端口已經關閉
echo.
echo.
echo.
echo.
echo By: c
echo.
echo.
echo.
echo 按任意鍵退出
pause>nul