açık port bulucu ( Port Scanner )
Dim delay, port As Integer
Private Sub Command1_Click()
List1.Clear
Timer1.Interval = delay
Timer2.Interval = delay
Timer3.Interval = delay
Timer4.Interval = delay
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
Timer4.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
Timer4.Enabled = False
End Sub
Private Sub Form_Load()
port = 80
delay = 600
End Sub
Private Sub Winsock1_Close()
Winsock1.Close
End Sub
Private Sub Winsock1_Connect()
List1.AddItem Winsock1.RemoteHostIP
Winsock1.Close
End Sub
Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Winsock1.Close
End Sub
Private Sub Winsock2_Close()
Winsock2.Close
End Sub
Private Sub Winsock2_Connect()
List1.AddItem Winsock2.RemoteHostIP
Winsock2.Close
End Sub
Private Sub Winsock2_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Winsock2.Close
End Sub
Private Sub Winsock3_Close()
Winsock3.Close
End Sub
Private Sub Winsock3_Connect()
List1.AddItem Winsock3.RemoteHostIP
Winsock3.Close
End Sub
Private Sub Winsock3_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Winsock3.Close
End Sub
Private Sub Winsock4_Close()
Winsock4.Close
End Sub
Private Sub Winsock4_Connect()
List1.AddItem Winsock4.RemoteHostIP
End Sub
Private Sub Winsock4_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Winsock4.Close
End Sub
Private Sub Timer1_Timer()
Winsock1.Close
Winsock1.Connect getip, port
End Sub
Private Sub Timer2_Timer()
Winsock2.Close
Winsock2.Connect getip, port
End Sub
Private Sub Timer3_Timer()
Winsock3.Close
Winsock3.Connect getip, port
End Sub
Private Sub Timer4_Timer()
Winsock4.Close
Winsock4.Connect getip, port
End Sub
Public Function getip() As String
getip = ip1.Text & "." & ip2.Text & "." & ip3.Text & "." & ip4.Text
If ip4.Text < 255 Then
ip4.Text = ip4.Text + 1
ElseIf ip4.Text = 255 Then
ip4.Text = 0
If ip3.Text < 255 Then
ip3.Text = ip3.Text + 1
ElseIf ip3.Text = 255 Then
ip3.Text = 0
If ip2.Text < 255 Then
ip2.Text = ip2.Text + 1
ElseIf ip2.Text = 255 Then
ip2.Text = 0
End If
End If
End If
End Function