dl528888
作者dl528888·2015-06-05 15:15
系统运维工程师·游戏公司

关闭不安全端口的脚步

字数 3165阅读 2600评论 1赞 2

最近发现公司员工都是使用的是360、金山、nod32等杀毒软件,只是运行在电脑上,没有详细的调试,我这样做除了能解决一下明显的病毒外,其他的加壳的病毒基本防御不了,所以我就简单的弄了个脚本,参照网络的一下脚本知识,弄了个关闭不安全端口,希望多大家有用!

    @echo off

    title 关闭常见的危险端口

    echo.

    echo 本批处理用于启动XP系统的防火墙并关闭常见的危险端口

    echo.

    echo 请确认您正在使用的是XP系统 并且未安装其他防火墙

    echo.

    echo 以避免与XP系统的防火墙发生冲突

    echo.

     pause


    echo 正在启动防火墙 请稍候…

    netsh firewall set opmode mode=enable

    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 正在关闭161端口 请稍候…

    netsh firewall set portopening protocol = ALL port = 161 name = 161 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 正在关闭2745端口 请稍候…

    netsh firewall set portopening protocol = TCP port = 2745 name = 2745 mode = DISABLE scope = ALL profile = ALL

    echo 正在关闭3127端口 请稍候…

    netsh firewall set portopening protocol = TCP port = 3127 name = 3127 mode = DISABLE scope = ALL profile = ALL
  
    echo 正在关闭3389端口 请稍候…

    netsh firewall set portopening protocol = ALL port = 3389 name = 3389 mode = DISABLE scope = ALL profile = ALL
   
    echo 正在关闭6129端口 请稍候…

    netsh firewall set portopening protocol = TCP port = 6129 name = 6129 mode = DISABLE scope = ALL profile = ALL
    cls

    echo.

    echo          常见的危险端口已经关闭

    echo.

    echo                                By: Alan.deng

    echo.

    echo 按任意键退出

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

2

添加新评论1 条评论

青云QingCloud青云QingCloud技术经理北京青云科技股份有限公司
2015-06-19 13:01
赞。这个不错。
Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广