Skip to content

secnnet/Port-Scan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Port Scan

This PowerShell script is designed to check for open ports on a local machine. Here's a summary of how it works:

It creates an array of commonly used port numbers ($ports) in computer networks. These ports are often targeted by attackers looking for vulnerable systems.

It uses a foreach loop to iterate through each port in the array.

For each port, it uses the Test-NetConnection cmdlet to test whether the port is open on the local machine.

If the port is open, the script outputs a message indicating that the port is open.

If the port is closed, the script outputs a message indicating that the port is closed.

By running this script, you can quickly identify open ports on your local machine and take steps to secure any open ports that are not necessary for your system to function. 😊