Valhalla Legends Forums Archive | Battle.net Bot Development | Need help with Winpcap data buffer.

AuthorMessageTime
Purri
Im getting data over winpcap lib, and i mess thinks with it. I dont know how to build buffer to that :S
Im not asking code , i wanna know how to make buffer for this.

Atm im getting this from game
[code]
[19:34:24] Unparsed Packet: 0x30
30 30 31 44 36 30 37 38 33 45 45 46 30 30 32 31       001D60783EEF0021
30 35 43 37 34 44 33 35 30 38 30 30 34 35 30 30       05C74D3508004500
30 30 37 38 30 35 41 36 34 30 30 30 37 38 30 36       007805A640007806
36 45 34 36 44 33 32 42 39 46 39 33 35 42 39 43       6E46D32B9F935B9C
43 30 33 38 32 42 30 30 46 30 33 32 45 46 31 38       C0382B00F032EF18
43 44 32 43 31 41 38 44 32 39 33 38 35 30 31 38       CD2C1A8D29385018
46 46 39 37 42 32 37 45 30 30 30 30 41 31 35 30       FF97B27E0000A150
30 30 38 30 30 31 30 30 30 30 42 37 31 36 30 43       0080010000B7160C
36 42 35 43 30 31 33 34 41 46 39 34 31 41 30 41       6B5C0134AF941A0A
42 46 42 33 31 30 38 31 44 32 31 33 32 38 30 39       BFB31081D2132809
39 36 31 36 42 30 30 42 41 34 37 34 41 33 39 42       9616B00BA474A39B
44 46 45 46 35 42 31 41 39 38 35 39 31 45 45 45       DFEF5B1A98591EEE
35 39 46 33 31 43 46 37 34 38 35 39 31 45 45 45       59F31CF748591EEE
35 39 46 33 31 43 46 37 34 38 35 39 31 45 45 45       59F31CF748591EEE
35 39 46 33 31 43 46 37 34 38 37 38 39 30 43 46       59F31CF7487890CF
35 32 39 43 44 35 32 39 34 32 35 37 34 36 34 35       529CD52942574645
39 45 38 43 45 43 43 35 44 30 41 46                   9E8CECC5D0AF

[19:34:24] Unparsed Packet: 0x30
30 30 31 44 36 30 37 38 33 45 45 46 30 30 32 31       001D60783EEF0021
30 35 43 37 34 44 33 35 30 38 30 30 34 35 30 30       05C74D3508004500
30 30 36 30 30 37 43 30 34 30 30 30 37 38 30 36       006007C040007806
36 43 34 34 44 33 32 42 39 46 39 33 35 42 39 43       6C44D32B9F935B9C
43 30 33 38 32 42 30 30 46 30 33 32 45 46 31 38       C0382B00F032EF18
43 44 37 43 31 41 38 44 32 39 33 38 35 30 31 38       CD7C1A8D29385018
46 46 39 37 46 36 36 42 30 30 30 30 41 31 33 38       FF97F66B0000A138
30 30 46 45 46 45 46 45 46 45 41 34 33 30 41 39       00FEFEFEFEA430A9
36 44 45 34 44 45 31 41 37 41 31 32 46 35 34 46       6DE4DE1A7A12F54F
35 46 33 34 46 31 30 38 38 38 36 32 43 39 36 41       5F34F1088862C96A
46 37 45 38 30 38 31 44 35 30 45 45 35 42 44 31       F7E8081D50EE5BD1
43 46 45 45 37 45 44 46 42 35 43 41 44 43 45 36       CFEE7EDFB5CADCE6
44 39 30 38 45 39 38 43 41 34 41 41 41 35 33 38       D908E98CA4AAA538
46 30 42 32 43 43 35 44 38 39 41 46                   F0B2CC5D89AF

[/code]

As you can see, its horrible.

And my code :
[code]
Private Sub opacketx_OnPacket(ByVal pPacket As PacketXLibCtl.IPktXPacket)
'11000 (the patch server)
'11002 (the login server)
'11008 (the game server)

On Error Resume Next
''There is In-game packets:
If (pPacket.SourcePort = 11008) Then
  Dim vByte As Variant
  Dim sData As String
  For Each vByte In pPacket.data
    If vByte <= &HF Then
      sData = sData + Hex(vByte)
    End If
  Next
Call parsegamepackets(sData)
End If
End Sub

Public Function parsegamepackets(ByRef data As String)
'data = Mid(data, 35) ' cut first crap
Dim ID As Byte
ID = Asc(Mid(data, 1, 1))
    Select Case ID
case &H0 '
        Case Else
            ShowChat vbRed,  mod1.log(data)
    End Select
End Function
[/code]
February 20, 2010, 5:32 PM
vector
Uh, packet buffer? You'll need functions for inserting/extracting different types of data into/from the packet.

Essentially, you would dump the valid part of the data (past header) into the packet handler, and then extract data from that.

February 21, 2010, 12:00 PM
Purri
[quote author=vector link=topic=18173.msg184170#msg184170 date=1266753606]
Uh, packet buffer? You'll need functions for inserting/extracting different types of data into/from the packet.

Essentially, you would dump the valid part of the data (past header) into the packet handler, and then extract data from that.


[/quote]

Can u explaing how i do it? i wanna learn this
February 21, 2010, 2:56 PM

Search