Batch Processing of dangerous ports with one click (preventing hacker intrusion)

Source: Internet
Author: User

Close dangerous ports with one click (preventing hacker intrusion)
Dangerous, port, hacker
Copy all of the following content
Use NotePad to save the suffix
Bat
Copy From @ below as prompted

Copy codeThe Code is as follows: @ echo off
Color 1f
Title: Disable common dangerous ports
Echo.
Echo.
Echo this batch is used to start the firewall of the XP system and disable common dangerous ports.
Echo.
Echo, please make sure that you are using the XP system and have not installed other firewalls
Echo.
Echo to avoid conflicts with the firewall of the XP System
Echo.
Echo.
Echo.
Pause
Cls
Echo is starting the firewall. Please wait...
SC config SharedAccess start = auto> nul
Net start SharedAccess> nul
Echo firewall has been started successfully
Echo.
Echo is disabling common dangerous ports. Please wait...
Echo.
Echo closing port 135... please wait...
Netsh firewall set portopening protocol = ALL port = 135 name = 135 mode = DISABLE scope = ALL profile = ALL
Echo closing port 137... please wait...
Netsh firewall set portopening protocol = ALL port = 137 name = 137 mode = DISABLE scope = ALL profile = ALL
Echo closing port 138... please wait...
Netsh firewall set portopening protocol = ALL port = 138 name = 138 mode = DISABLE scope = ALL profile = ALL
Echo closing port 139... please wait...
Netsh firewall set portopening protocol = ALL port = 139 name = 139 mode = DISABLE scope = ALL profile = ALL
Echo closing port 445... please wait...
Netsh firewall set portopening protocol = ALL port = 445 name = 445 mode = DISABLE scope = ALL profile = ALL
Echo closing port 593... please wait...
Netsh firewall set portopening protocol = TCP port = 593 name = 593 mode = DISABLE scope = ALL profile = ALL
Echo closing port 1025... please wait...
Netsh firewall set portopening protocol = TCP port = 1025 name = 1024 mode = DISABLE scope = ALL profile = ALL
Echo closing port 3389... please wait...
Netsh firewall set portopening protocol = ALL port = 3389 name = 3389 mode = DISABLE scope = ALL profile = ALL
Cls
Echo.
Echo.
Echo.
Echo common dangerous ports have been disabled
Echo.
Echo.
Echo.
Echo.
Echo
Echo.
Echo.
Echo.
Echo press any key to exit
Pause> nul

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.