基本信息
源码名称:VB6写的一个端口批量扫描器
源码大小:0.02M
文件格式:.zip
开发语言:ASP
更新时间:2018-04-01
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
Private Sub cmdStart_Click()
Dim i As Long
Dim j As Integer
Dim k As Long, l As Long
Dim t As String, ts As String, tip As String
ts = txtList1.Text
t = " "
j = Int(txtPort.Text)
If j < 1 Or j > 65535 Then
MsgBox "检查端口号之于0-65535之间", vbExclamation, "端口错误"
End If '
Dim c As Long
txtList2.Text = ""
cmdStart.Enabled = False
cmdStop.Enabled = True
k = 0
l = 0
Do Until t = ""
k = k 1
If st = True Then
cmdStart.Enabled = True
st = False
Exit Do
End If
t = GetStr(ts, "", vbCrLf, i)
c = 0
If Len(t) >= 4 Then '如果不是空的
tip = GetStr(t, "", txtsp.Text)
'tip = GetStr(tip, vbCrLf, "")
tip = Replace(tip, Chr(10), "")
tip = Replace(tip, Chr(13), "")
If Client1.State <> sckClosed Then Client1.Close
' MsgBox Client1.State & vbCrLf & tip & ":" & j
Client1.RemoteHost = tip
Client1.RemotePort = j
Client1.Connect tip, j
Do Until Client1.State = 7
DoEvents
PauseTime 10
c = c 1
If c > 10 Then
GoTo a
End If
Loop
If Client1.State = sckConnected Then
l = l 1
If txtList2.Text = "" Then
txtList2.Text = tip
Else: txtList2.Text = txtList2.Text & vbCrLf & tip
End If
a:
Client1.Close
End If
End If
Lbl1.Caption = "已扫:" & k - 1 & "条 | 连接上:" & l & "条"
Loop
MsgBox "扫描结束", vbInformation
cmdStart.Enabled = True
cmdStop.Enabled = False
End Sub