Schön guten Tag,
Ich wollte mir mal einen eigenen kleinen Ip Scanner coden, der die Range nach Port 21 abscannt,da ich wir hier im Lan 3 Ftp Server amlaufen haben und ich so nachgucken kann ob sie noch laufen.
So entstand folgender Code:
[vb:1:b264bc4e6d]Private Sub cmdstart_Click()
Timerscan.Enabled = True
End Sub
Private Sub cmdstop_Click()
Timerscan.Enabled = False
End Sub
Private Sub Timerscan_Timer()
On Error Resume Next
Do Until Timerscan.Enabled = False
socket.Close
socket.RemoteHost = Text1.Text & "." & Text2.Text & "." & Text3.Text & "." & Text4.Text
socket.RemotePort = "21"
socket.Connect
Increment
Loop
End Sub
Function Increment()
If Text4.Text > 255 Then
Text3.Text = Text3.Text + 1
Text4.Text = 0
End If
If Text3.Text > 255 Then
Text2.Text = Text2.Text + 1
Text3.Text = 0
End If
If Text2.Text > 255 Then
Text1.Text = Text1.Text + 1
Text2.Text = 0
End If
If Text1.Text & Text2.Text & Text3.Text & Text4.Text = Text5.Text & Text6.Text & Text7.Text & Text8.Text Then
Timerscan.Enabled = False
MsgBox "Scan completed!", vbInformation
End If
End Function
[/vb:1:b264bc4e6d]
Jetzt scannt er aber nicht , und hängt sich auf
Habe das Project mal zum besseren verständnis hoch geladen
EDIT: Ups falsche rar hochgeladen.
Hier die richtige
http://xirror.com/spread/48828124/Ip_scanner.rar.html