win8如何快速关闭135\445端口,预防onion永恒之蓝病毒

网上关于关闭win7的135、445端口教程比较多,win10可以直接更新补丁,那么win8呢!

根本没有许策略面板!!!

下面是广大win8用户关闭135、445端口教程。

1.首先新建一个txt文本文档,如图


2.复制粘贴下列代码并保存

%%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
@echo off 
color 1f 
title 关闭135 445 端口
echo. 
echo. 
echo. 
echo 正在关闭135端口 请稍候… 
netsh advfirewall firewall add rule name = "Disable port 135 - TCP" dir = in action = block protocol = TCP localport = 135
echo. 
netsh advfirewall firewall add rule name = "Disable port 135 - UDP" dir = in action = block protocol = UDP localport = 135
echo. 
echo 正在关闭445端口 请稍候… 
netsh advfirewall firewall add rule name = "Disable port 445 - TCP" dir = in action = block protocol = TCP localport = 445
echo. 
netsh advfirewall firewall add rule name = "Disable port 445 - UDP" dir = in action = block protocol = UDP localport = 445
echo.
echo 按任意键退出 
pause>nul


3.修改文件后缀名为.bat,这时已经是批处理文件



4.选中文件右键点击,选择以管理员身份运行,如果有杀毒软件阻止选择同意运行



5.完成





你可能感兴趣的:(网路安全)