Netcat is one of the best tools to check if port is open or not, and Netcat does offer also a lot of features other than port scanning.
However, if netcat is not available on the system or it's not allowed to be installed. In Windows environment PowerShell will come in handy.
Example one-liner code below uses PowerShell to scan a specified Target IP and also a range of ports to be scanned.
To test the code, change the target IP as desired and also the range of port to be tested.
1..65535 | % {Test-NetConnection 127.0.0.1-Port $_ }
442..443 | % {Test-NetConnection 8.8.8.8 -Port $_ }
Sample Output of the above commands:
1..10 | % {Test-NetConnection 127.0.0.1-Port $_ }
442..443 | % {Test-NetConnection 8.8.8.8 -Port $_ }
Cheers! Take care. Till next Time. Enjoy exploring the world of PowerShell and enjoy the journey of learning..
Stay safe! and Keep things up!
Do ASAP, Always Say A Prayer...
Practice O.T.G. = Obedience To God
Make time for Prayer and Meditation.
================================
Free Android Apps:
Click links below to find out more:
Free Android Apps:
Click links below to find out more:
Excel Keyboard guide:
https://play.google.com/store/apps/details?id=chrisjoms.myexcelapplicationguide
Heaven's Dew Fall Prayer app for Android :
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Catholic Rosary Guide for Android:
Pray the Rosary every day, countless blessings will be showered upon your life if you recite the Rosary faithfully.
https://play.google.com/store/apps/details?id=com.myrosaryapp
Divine Mercy Chaplet Guide (A Powerful prayer) BFF = Be Filled Faith:
Comments
Post a Comment