Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize batch processing of shutting down dangerous ports with one button

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article is about how to implement batch processing to close dangerous ports with one click. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Close the dangerous port with one button (to prevent hackers)

Danger, ports, hackers.

Copy all of the following

Use notepad to save the suffix as

Bat

Follow the prompts to copy from @ below

The code is as follows:

@ echo off

Color 1f

Title shuts down common dangerous ports

Echo.

Echo.

Echo this batch is used to start the firewall of the XP system and close common dangerous ports

Echo.

Echo, please make sure that you are using a XP system and that no other firewalls are installed.

Echo.

Echo to avoid conflicts with the firewall of the XP system

Echo.

Echo.

Echo.

Pause

Cls

Please wait while echo starts the firewall.

Sc config SharedAccess start= auto > nul

Net start SharedAccess > nul

Echo Firewall has been started successfully

Echo.

Please wait while echo shuts down common dangerous ports.

Echo.

Echo is shutting down port 135. please wait a moment.

Netsh firewall set portopening protocol = ALL port = 135name = 135mode = DISABLE scope = ALL profile = ALL

Echo is shutting down port 137. please wait a moment.

Echo is shutting down port 138. please wait a moment.

Echo is shutting down port 139. please wait a moment.

Netsh firewall set portopening protocol = ALL port = 139name = 139mode = DISABLE scope = ALL profile = ALL

Echo is shutting down port 445. please wait a moment.

Netsh firewall set portopening protocol = ALL port = 445 name = 445 mode = DISABLE scope = ALL profile = ALL

Netsh firewall set portopening protocol = TCP port = 593name = 593mode = DISABLE scope = ALL profile = ALL

Please wait a moment while echo shuts down port 1025.

Netsh firewall set portopening protocol = TCP port = 1025 name = 1024 mode = DISABLE scope = ALL profile = ALL

Please wait a moment while echo shuts down port 3389.

Cls

Echo.

Echo.

Echo.

The common dangerous port of echo has been shut down

Echo.

Echo.

Echo.

Echo.

Echo

Echo.

Echo.

Echo.

Echo press any key to exit

Pause > nul

Thank you for reading! This is the end of this article on "how to close dangerous ports with one click". I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report