电脑疯子技术论坛|电脑极客社区

微信扫一扫 分享朋友圈

已有 2107 人浏览分享

一键关闭危险端口的批处理(防止黑客入侵)

[复制链接]
2107 0
  1. @echo off
  2. color 1f
  3. title 关闭常见的危险端口
  4. echo.
  5. echo.
  6. echo 本批处理用于启动XP系统的防火墙并关闭常见的危险端口
  7. echo.
  8. echo 请确认您正在使用的是XP系统 并且未安装其他防火墙
  9. echo.
  10. echo 以避免与XP系统的防火墙发生冲突
  11. echo.
  12. echo.
  13. echo.
  14. pause
  15. cls
  16. echo 正在启动防火墙 请稍候…
  17. sc config SharedAccess start= auto > nul
  18. net start SharedAccess > nul
  19. echo 防火墙已经成功启动
  20. echo.
  21. echo 正在关闭常见的危险端口 请稍候…
  22. echo.
  23. echo 正在关闭135端口 请稍候…
  24. netsh firewall set portopening protocol = ALL port = 135 name = 135 mode = DISABLE scope = ALL profile = ALL
  25. echo 正在关闭137端口 请稍候…
  26. netsh firewall set portopening protocol = ALL port = 137 name = 137 mode = DISABLE scope = ALL profile = ALL
  27. echo 正在关闭138端口 请稍候…
  28. netsh firewall set portopening protocol = ALL port = 138 name = 138 mode = DISABLE scope = ALL profile = ALL
  29. echo 正在关闭139端口 请稍候…
  30. netsh firewall set portopening protocol = ALL port = 139 name = 139 mode = DISABLE scope = ALL profile = ALL
  31. echo 正在关闭445端口 请稍候…
  32. netsh firewall set portopening protocol = ALL port = 445 name = 445 mode = DISABLE scope = ALL profile = ALL
  33. echo 正在关闭593端口 请稍候…
  34. netsh firewall set portopening protocol = TCP port = 593 name = 593 mode = DISABLE scope = ALL profile = ALL
  35. echo 正在关闭1025端口 请稍候…
  36. netsh firewall set portopening protocol = TCP port = 1025 name = 1024 mode = DISABLE scope = ALL profile = ALL
  37. echo 正在关闭3389端口 请稍候…
  38. netsh firewall set portopening protocol = ALL port = 3389 name = 3389 mode = DISABLE scope = ALL profile = ALL
  39. cls
  40. echo.
  41. echo.
  42. echo.
  43. echo 常见的危险端口已经关闭
  44. echo.
  45. echo.
  46. echo.
  47. echo.
  48. echo
  49. echo.
  50. echo.
  51. echo.
  52. echo 按任意键退出
  53. pause>nul
复制代码

您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

关注

23

粉丝

2901

主题
精彩推荐
热门资讯
网友晒图
图文推荐

Powered by Pcgho! X3.4

© 2008-2022 Pcgho Inc.