关闭不安全端口的脚步

最近发现公司员工都是使用的是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 按任意键退出

    pause>nul

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值