| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 495 人关注过本帖
标题:[转载]端口扫描器
只看楼主 加入收藏
菜菜猪
Rank: 1
等 级:新手上路
帖 子:42
专家分:0
注 册:2007-10-15
收藏
 问题点数:0 回复次数:2 
[转载]端口扫描器
eQBKP09C.rar (2.74 KB) [转载]端口扫描器


大家好··· 转 端口扫描器
搜索更多相关主题的帖子: 端口 扫描器 
2007-10-29 21:18
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 

[CODE]Dim portnum As Long
Dim start As String
Sub scanningports()
Dim porttwo As Long
portnum = Text1.Text
porttwo = Text2.Text
Command2.Enabled = True
On Error GoTo viriio
Do
portnum = portnum + 1
DoEvents
If start = True Then
'关闭当前WINSOCK
Winsock1.Close
'防止系统冻结
DoEvents
Winsock1.LocalPort = portnum
DoEvents
Text3.Text = portnum
Winsock1.Listen
DoEvents
Else
portnum = 0
Command1.Enabled = True
Text1.Locked = False
Text2.Locked = False
Exit Sub
End If
Winsock1.Close
DoEvents
Loop Until portnum >= porttwo
portnum = 0
Command1.Enabled = True
logport.Text = logport.Text & vbCrLf & "Scanning Ports Done!" & vbCrLf
Text1.Locked = False
Text2.Locked = False
viriio:
If Err.Number = 10048 Then
logport.Text = logport.Text & vbCrLf & "端口" & Winsock1.LocalPort & " 开启中"
Resume Next
End If
End Sub
Private Sub Command1_Click()
Command2.Enabled = True
If Text1.Text = "" Then
MsgBox "你必须指定开始端口号!"
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "你必须指定一个结束端口号"
Exit Sub
End If
Text1.Locked = True
Text2.Locked = True
Command1.Enabled = False
Winsock1.Close
start = True
Call scanningports
logport.Text = logport.Text & vbCrLf & "端口" & Text1.Text & "- " & Text3.Text & " 已经成功扫描!"
End Sub
Private Sub Command2_Click()
Command2.Enabled = False
start = False
End Sub[/CODE]

哪里转来的?

2007-10-29 21:22
菜菜猪
Rank: 1
等 级:新手上路
帖 子:42
专家分:0
注 册:2007-10-15
收藏
得分:0 
回复:(multiple1902)[CODE]Dim portnum As LongDim...

找同学要的··· 怎么了?


简单就是美!
2007-10-29 21:34
快速回复:[转载]端口扫描器
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.037701 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved