Valhalla Legends Forums Archive | Battle.net Bot Development | 0x3A - Little Help

AuthorMessageTime
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:


[code]
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

[/code]

If you could please tell me whats wrong with the one above or if the one below that one is correct.
May 17, 2004, 6:44 PM
FuzZ
[quote author=Networks link=board=17;threadid=6848;start=0#msg60534 date=1084819464]
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:


[code]
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

[/code]

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

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

[code]
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
[/code]

Edit> This is not my code, a few things may have been modified by me, but I think I got it from another bot.
May 17, 2004, 6:57 PM
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
May 17, 2004, 10:32 PM
FuzZ
[quote author=Networks link=board=17;threadid=6848;start=0#msg60538 date=1084833121]
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
[/quote]

uhm, you're sort of sending username/password a little soon.
check out bnetdocs logon sequences.
May 17, 2004, 10:36 PM
LoRd
Even though I despise code leeching, this may help you learn.
May 17, 2004, 11:25 PM
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?

[code]
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."
[/code]

May 20, 2004, 2:48 PM
DaRk-FeAnOr
Just a word of advice: Nesting your code makes it easier to read and debug.
May 20, 2004, 6:51 PM
Flame
Just a guess here, but according to the function "A" found in bnetauth.dll, the second item should be the ServerKey:
[code]rb = A(tempb, GetTickCount(), varPass)[/code]
The postition in which GetTickCount() is located, should be where the ServerKey is found, which is received during 0x50:
[code]ServerKey& = Val("&h" & StrToHex(StrReverse(Mid$(strData, 9, 4))))[/code]
I'm not sure how important the ServerKey is, but it's the best thing I can come up with
May 20, 2004, 8:41 PM
Networks
Never mind guys thanks for the support:

[code]
[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
[/code]
May 21, 2004, 11:06 PM

Search