自从比特币病毒在全球散播 主要在高校蔓延导致一大波快毕业的学生毕业设计 论文等被加密,引起了惶恐,开始各种系统的升级打补丁。。。
今天贴出一建关闭危险端口的代码:保存为.bat文件双击打开运行即可。防患未然!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
@echo off color 1f title 关闭常见的危险端口 echo. echo. echo 本批处理用于启动windows系统的防火墙并关闭常见的危险端口 echo. echo 请确认您正在使用的是windows系统 并且未安装其他防火墙 echo. echo 以避免与windows系统的防火墙发生冲突 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 echo. echo. echo. echo 按任意键退出 pause>nul |