Post by
krazydriver »
https://forums.nicoclub.com/krazydriver-u56503.html
Sun Jul 15, 2007 5:47 pm
On Error Resume Next
Wscript.StdOut.Write "Enter the IP address to be scanned: "strIP = Wscript.StdIn.ReadLine
Set objNetwork = CreateObject("Wscript.Network")strComputer = objNetwork.ComputerName
Set asObj = CreateObject("ActivXperts.Socket")
For A = 1 To 1024 Step +1
asObj.Connect strIP, A
If asObj.LastError = 0 And asObj.ConnectionState = 3 Then Wscript.Echo strComputer & " has port # " & A & " open." asObj.DisconnectEnd If
Next
Wscript.Echo "Port Scanning has completed !!"
if the machine your testing is windows based. copy and paste this in notepad then save as a .vbs just double-click running this defaults to the local machine. if you open it in a command prompt, it asks for an IP so you can check other machines.
i can't find it now, but i also have a Perl port scanner if your not on windows.