Mini Port Scanner

Find out which ports are opened

The more you have open ports, the more you could get a security attack. With this script, just submit an IP address and it will tell you which ports are opened

File Name : scanport.vbs
Requirement : Winsock 2 (MSWinsck.ocx >v 6.xxx) with a valid licence (i.e. Visual Studio installed)
Author : Jean-Luc Antoine
Submitted : 30/03/2002
Category : 4K
Option Explicit

If WScript.Arguments.Count<>1 Then
	Wscript.Echo "Param : RemoteHostIP"
	WScript.Quit
End If

Dim K,P
If right(Ucase(WScript.FullName),11)="WSCRIPT.EXE" Then
	Set K=CreateObject("WScript.Shell")
	K.Run K.ExpandEnvironmentStrings("%COMSPEC%") & " /C cscript.exe """ & WScript.ScriptFullName & """ " & WScript.Arguments(0),1,False
	Set K=Nothing
	WScript.Quit
End If

Set K=I()

L "PortScanner running on " & K.LocalHostName & " (" & K.LocalIP & ")"

K.RemoteHost=WScript.Arguments(0)
For P=1 To 3000
	K.RemotePort=P
	K.Connect
	While K.State<>0
		wscript.sleep 90
	Wend
Next
L "End"

Function I()
	On Error Resume Next
	Err.Number=0
	Set I=WScript.CreateObject("MSWinsock.Winsock","s_")
	Select Case Err.Number
	Case 0
	case &H80040112
		L "No licence found. Install Visual Studio"
	case &H80020009
		L "ActiveX Winsock not registered - use regsvr32"
	Case else
		L "Error " & Err.Number & " - &H" & Hex(Err.Number) & " - " & Err.Description
	End Select
End Function

Sub L(S):WScript.Echo S:End Sub

Sub s_Connect
	K.Close
	L "Port " & P & " Open !"
End Sub
Sub s_Error(ByVal N,D,c,S,F,H,A)
	K.Close
	If N=10061 Then
		WScript.StdOut.Write "."
	Else
		L P & ":" & N & " " & D
	End If
End Sub
Server Info
Remote Info
Compress

Batchs
BootSector
Droit
Accessoire GFA
On Now
Ecran plasma
Système d'exploitation
Son
Unités
Scripting
Multilingue
Site Web
Bruit et son
Architecture Google


4K
Color picker
TaskList
Backup files
Mini Port Scanner
Website To CHM
PixyDemo
Web password recovery
4KWebServer
Kill Popup
VBE decoder
Script Optimizer
Database Password Recovery
Class
Ini
EMail validator
Graphical Class
MP3 Info
Pinger Class
IP ranger class
SoftwareMetering
Path Validator
Time Stamper Class
LoggerCLS
HTA
Keyword Ranking
DOM Explorer
HTA-Notepad
PixyPortManager
Other
flashMessage
Kill Popup
VBE decoder (fixed)
Error Codes
Maze generator
Char counter
HTML To Word
ICQ Choose User
ScreenSaver Password decoder
Mp3Playlister - singleList
Long Filename To Short
Trace Math
Dump Hexa File
Self modifying script
Mp3Playlister - multiList
HTANoid
PixyWebServer
Python
Progress indication

©2002 Jean-Luc Antoine. All Rights Reserved. Scripts or any other material on this website may not be redistributed or put as part of ANY collection (script archives, CDs etc) without prior written permission. Permission granted to use and modify any of the scripts found on InterClasse.com