下载首页 | 资讯中心 | 下载分类 | 最近更新 | 排 行 榜 | 国产软件 | 国外软件 | 汉化补丁 |
文章搜索: 分类 关键字 收藏本站设为首页
您的位置:首页网页设计ASP程序 → VB 从零开始编外挂(八)__教程
VB 从零开始编外挂(八)__教程
日期:2007-5-20 1:20:22 人气:306     [ ]
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页
str = buffer()
resarray(CountID) = res

CopyMemory Header, buffer(0), Len(Header) '将 buffer 里面的数据复制到 Header 结构里面

'根据IP头结构的标识来获得是什么类型的数据包,并将 IP 从头结构中分离出来
If Header.proto = 1 Then
protocol = "ICMP"
proticmp inversaip(Hex(Header.destIP)), inversaip(Hex(Header.sourceIP))
End If
If Header.proto = 6 Then
protocol = "TCP"
protcp inversaip(Hex(Header.destIP)), inversaip(Hex(Header.sourceIP))
End If
If Header.proto = 17 Then
protocol = "UDP"
proudp inversaip(Hex(Header.destIP)), inversaip(Hex(Header.sourceIP))
End If
End If
Loop Until res <> 2000
End If
End Sub

'将 16 进制转换为 IP 地址
Public Function inversaip(ByRef lng As String) As String
Dim ips As String

Select Case Len(lng)
Case 1
lng = "0000000" & lng
Case 2
lng = "000000" & lng
Case 3
lng = "00000" & lng
Case 4
lng = "0000" & lng
Case 5
lng = "000" & lng
Case 6
lng = "00" & lng
Case 7
lng = "0" & lng
End Select
For i = 1 To Len(lng) Step 2
ips = ips & Val("&h" & Mid(lng, Len(lng) - i, 2)) & "."
Next i

inversaip = Mid(ips, 1, Len(ips) - 1)
End Function


Public Function proticmp(saa As String, soc As String) As String
Dim ListTemp As Variant
Set ListTemp = Form1.ListView1.ListItems.Add(, , soc)
ListTemp.SubItems(2) = saa
ListTemp.SubItems(4) = protocol
ListTemp.SubItems(5) = Time

CopyMemory icmpHead, buffer(0 + 20), Len(icmpHead)

End Function

Public Sub protcp(saa As String, soc As String)
Dim ListTemp As Variant
CopyMemory tcpHead, buffer(0 + 20), Len(tcpHead)

Set ListTemp = Form1.ListView1.ListItems.Add(, , soc)
ListTemp.SubItems(1) = ntohs(tcpHead.th_sport)
ListTemp.SubItems(2) = saa
ListTemp.SubItems(3) = ntohs(tcpHead.th_dport)
ListTemp.SubItems(4) = protocol
ListTemp.SubItems(5) = Time
End Sub

Public Sub proudp(saa As String, soc As String)
Dim ListTemp As Variant
CopyMemory udpHead, buffer(0 + 20), Len(udpHead)


Set ListTemp = Form1.ListView1.ListItems.Add(, , soc)
ListTemp.SubItems(1) = ntohs(udpHead.th_sport)
ListTemp.SubItems(2) = saa
ListTemp.SubItems(3) = ntohs(udpHead.th_dport)
ListTemp.SubItems(4) = protocol
ListTemp.SubItems(5) = Time
End Sub


--------------------------------------------------------------------------------------------------------------------------------------------------------
彩色的太费时间了,所以就直接贴了!呵呵!

--------------------------------------------------------------------------------------------------------------------------------------------------------
点击给我留言

--------------------------------------------------------------------------------------------------------------------------------------------------------
出处:本站原创 作者:佚名
 阅读排行
01.精美qq空间横幅代码
02.最酷qq个性女生网名
03.最新又有免费QQ秀啦《..
04.巧用透明FlaSh扮靓你的..
05.花之神匠代码(最新代码..
06.最新QQ空间免费导航
07.最新免费个人形象设置..
08.最新qq空间flash代码m..
09.CSS技术结合图像实现动..
10.Photoshop光影魔术师:..
11.QQ音速种子狂刷
12.最新QQ空间透明代码
13.PS实例教程:教你制作结..
14.Photoshop光影魔术师:..
15.制作背景图__教程
16.用Photoshop制作漂亮的..
17.如何获得QQ音速种子
18.≤QQ空间代码≥在日志..
19.网页浮动广告的制作代..
20.用Photoshop制作大红灯..
21.常用CSS
22.Photoshop给靓丽美女打..
 推荐文章
·Photoshop 表现技法之..
·快速将你的相片矢量化..
·PHOTOSHOP制作炽热的太..
·用Photoshop制作美丽的..
·流行杀手的娃娃工厂__..
·打造8号台球__教程
·PHOTOSHOP制作待机MM图..
·用Photoshop帮MM做纹身..
·PHOTOSHOP美眉着色绝招..
·PHOTOSHOP花露的制作_..
·PHOTOSHOP渐变工具的巧..
·PHOTOSHOP手绘奥兰多-..
·高难度抠图两种方法__..
·Photoshop高尔夫球的制..
·Photoshop打造精美玉佩..
Eqxia_COM下载站 版权所有 Copyright© 2001-2005 Www.eqxia.COM, All Rights Reserved.