• Welcome to Valhalla Legends Archive.
 

0x3A - Little Help

Started by Networks, May 17, 2004, 01:44 PM

Previous topic - Next topic

Networks

I know there have been numerous topics on this and I've searched the board but I'd like to know what is wrong with this because I don't recieve it when I send it so some help with this is appreciated. Thank you in advance:



Public Sub 0x3A()
Dim dblseen as long, PacketData as string
dblseed = Val("&h" StrToHex(StrReverse(Token)))
PacketData = string(7 * 4, vbNullChar)
Result = a(PacketData, CLng(dblseed), varCDkey)
Packet.insertNonNTString PacketData
Packet.InsertNTString varUser
Packet.SendPacket &H3A
End Sub

Also I found this on the forums:

Public Sub Send_0x3A()
Dim dblSeed As Long, PacketData As String
dblSeed = Val("&h" & StrToHex(StrReverse(Token)))
PacketData = String(7 * 4, vbNullChar)
Result = a(PacketData, CLng(dblSeed), frmMain.Password)
PacketBuf.InsertDWORD GetTickCount()
PacketBuf.InsertDWORD CLng(Val("&h" & StrToHex(StrReverse(Token))))
PacketBuf.InsertNonNTString PacketData
PacketBuf.InsertNTString frmMain.Account
PacketBuf.SendPacket frmMain.sckBnet, &H3A
AddChat vbGrayText, "[" & Format(Time, "hh:mm:ss") & "] ", _
&HFFFFC0, "Sent 0x3A"
End Sub



If you could please tell me whats wrong with the one above or if the one below that one is correct.

FuzZ

#1
Quote from: Networks on May 17, 2004, 01:44 PM
I know there have been numerous topics on this and I've searched the board but I'd like to know what is wrong with this because I don't recieve it when I send it so some help with this is appreciated. Thank you in advance:



Public Sub 0x3A()
Dim dblseen as long, PacketData as string
dblseed = Val("&h" StrToHex(StrReverse(Token)))
PacketData = string(7 * 4, vbNullChar)
Result = a(PacketData, CLng(dblseed), varCDkey)
Packet.insertNonNTString PacketData
Packet.InsertNTString varUser
Packet.SendPacket &H3A
End Sub

Also I found this on the forums:

Public Sub Send_0x3A()
Dim dblSeed As Long, PacketData As String
dblSeed = Val("&h" & StrToHex(StrReverse(Token)))
PacketData = String(7 * 4, vbNullChar)
Result = a(PacketData, CLng(dblSeed), frmMain.Password)
PacketBuf.InsertDWORD GetTickCount()
PacketBuf.InsertDWORD CLng(Val("&h" & StrToHex(StrReverse(Token))))
PacketBuf.InsertNonNTString PacketData
PacketBuf.InsertNTString frmMain.Account
PacketBuf.SendPacket frmMain.sckBnet, &H3A
AddChat vbGrayText, "[" & Format(Time, "hh:mm:ss") & "] ", _
&HFFFFC0, "Sent 0x3A"
End Sub



If you could please tell me whats wrong with the one above or if the one below that one is correct.

I'm sure this is what you're looking for


   Dim outb$, rb&
   
   outb = String(7 * 4, vbNullChar)
   rb = a(outb, Hash.Servers, LCase$(sPassword))
   p.Clear
   p.InsertNonNTString outb
   p.InsertNTString sUserName
   p.SendPacket frmBNet.sckBNet, &H3A


Edit> This is not my code, a few things may have been modified by me, but I think I got it from another bot.

Networks

This is as far as I get with my 0x51 conn. I used 0x3A from feanors TCP conn. BTW but thanks

Connected to Battle.net!
0x01 sent
PXES
0x50 being sent
Received 0x50
Sent Username & Password.
Received 0x51
BNET: (0x0203) Invalid CD-key for this product!


My cdkey is fine and my product is PXES

FuzZ

Quote from: Networks on May 17, 2004, 05:32 PM
This is as far as I get with my 0x51 conn. I used 0x3A from feanors TCP conn. BTW but thanks

Connected to Battle.net!
0x01 sent
PXES
0x50 being sent
Received 0x50
Sent Username & Password.
Received 0x51
BNET: (0x0203) Invalid CD-key for this product!


My cdkey is fine and my product is PXES

uhm, you're sort of sending username/password a little soon.
check out bnetdocs logon sequences.

Eric

Even though I despise code leeching, this may help you learn.

Networks

[8:37:01 PM] Dimension Bot Initiated v1.0 Build 5 [ 0x51 Edition ]
[8:37:02 PM] BNET: Connecting to Useast.Battle.Net
[8:37:02 PM] Product set to: PXES
[8:37:03 PM] BNET: Connected
[8:37:03 PM] Chr(1) sent.
[8:37:03 PM] 0x50 Packet Sent.
[8:37:03 PM] 0x50 Packet Received.
[8:37:10 PM] CDKey Decoding worked!
[8:37:10 PM] 0x51 Packet has been sent.
[8:37:10 PM] 0x51 Packet Received.
[8:37:10 PM] BNET: Version and CD-key check passed!
[8:39:12 PM] 0x3A Packet Sent.
[8:39:13 PM] BNET: [ Disconnected ]


This is as far as I'm getting

0x3A is not being sent correctly any help?


Case &H51
  AddC vbYellow, "0x51 Packet Received."
 
  Select Case GetWORD(Mid(Data, 5, 2))
      Case &H0
          Dim tempb As String, rb As Long
          AddC vbGreen, "BNET: Version and CD-key check passed!"
         
          tempb = String(7 * 4, vbNullChar)
          rb = A(tempb, GetTickCount(), varPass)
              pbuffer.InsertNonNTString tempb
              pbuffer.InsertNTString (varUser)
              pbuffer.SendPacket &H3A: AddC vbYellow, "0x3A Packet Sent."



Dark-Feanor

#6
Just a word of advice: Nesting your code makes it easier to read and debug.
- Feanor[xL]
clan exile
Firebot
iago: "caps lock is like cruise control for cool"

Flame

#7
Just a guess here, but according to the function "A" found in bnetauth.dll, the second item should be the ServerKey:
rb = A(tempb, GetTickCount(), varPass)
The postition in which GetTickCount() is located, should be where the ServerKey is found, which is received during 0x50:
ServerKey& = Val("&h" & StrToHex(StrReverse(Mid$(strData, 9, 4))))
I'm not sure how important the ServerKey is, but it's the best thing I can come up with

Networks

Never mind guys thanks for the support:


[4:01:35 PM] Dimension Bot Initiated v1.0 Build 19 [ 0x51 Edition ]
[4:01:36 PM] BNET: Connecting to uswest.battle.net
[4:01:36 PM] Product set to: PXES
[4:01:36 PM] BNET: Connected
[4:01:36 PM] Chr(1) sent.
[4:01:36 PM] 0x50 Packet Sent.
[4:01:36 PM] 0x50 Packet Received.
[4:01:36 PM] CDKey Decoding worked!
[4:01:36 PM] 0x51 Packet has been sent.
[4:01:37 PM] 0x51 Packet Received.
[4:01:37 PM] BNET: Version and CD-key check passed!
[4:01:37 PM] 0x3A Packet Sent.
[4:01:37 PM] Received 0x3A
[4:01:37 PM] 0x0A Packet Sent.
[4:01:37 PM] Logon Passed.
[4:01:37 PM] Received 0x0A
[4:01:37 PM] // - Joined Channel: Op eKingdom