Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: R.a.B.B.i.T on December 09, 2004, 04:35 PM

Title: 0x53 Help
Post by: R.a.B.B.i.T on December 09, 2004, 04:35 PM
I fixed my 0x51 problems, as it turns out my code was not sending the version byte correctly (even though I thought I was).

My new problem, however, is in 0x53 BNCS/0x02 BNLS: I get IPBanned upon sending it.  My code for it is the following:
'BNLS Parser
        Case &H2
            InsertNTString Mid(szData, 4, 32)
            'I've also tried InsertNTString Mid(szData, 4)
            InsertNTString szUserName
            SendPacket BNCS, &H53
'BNCS Parser
        Case &H51
            Select Case GetWORD(Mid(szData, 5, 2))
                Case &H0
                    HandleEvent 0x51Pass
                    If varProduct = "3RAW" Or varProduct = "PX3W" Then
                        InsertNTString szUserName
                        InsertNTString szPassword
                        SendPacket BNLS, &H2
                    Else
                        '...
I don't know what's going on.  Can anyone spot a flaw in there?  The username is NT if I am correct?  The hash from BNLS is non-NT?  I've tried all 4 combos of NT pieces, but none worked.
Title: Re: 0x53 Help
Post by: Blaze on December 09, 2004, 04:46 PM
Ok, First of all 0x53 has a nonnt string, not a nt string. Second of all maybe your capping it at 32 is killing it? Your bnls 0x02 looks good.
Title: Re: 0x53 Help
Post by: R.a.B.B.i.T on December 09, 2004, 05:55 PM
The BNLSProtocol Spec says that the data for 0x53 sent in 0x02 is 8 DWORDs, hence the 32.  I've also tried not capping it, but it's the same result.  Using a non NT string gets me IPBanned from Battle.Net.  Using an NT string merely halts logon and disconnects me.
Title: Re: 0x53 Help
Post by: The-FooL on December 09, 2004, 05:57 PM
The hash is non-NT, its not a string.  Inserting it as a string is just an easy way to copy it over.
Title: Re: 0x53 Help
Post by: R.a.B.B.i.T on December 09, 2004, 06:07 PM
I know.  And I've added it non NT before, but that didn't do anything.

Also, I can't seem to connect to BNLS, and my JBLS is giving me "[BNLS Parse] Hash Exception: Error hashing: [CheckRevision] Files Not Found/Accessible (WAR3)Hashing.HashException", so it looks like I'll have to wait a bit.

[edit]
Solved the problem: my values were being edited before being sent.
Title: Re: 0x53 Help
Post by: Blaze on December 09, 2004, 06:15 PM
Packet Log!
Title: Re: 0x53 Help
Post by: Zakath on December 09, 2004, 06:33 PM
0x53 contains 8 DWORDs (the user's public key, a 256-bit number), and then the user's account (a null-terminated string).

A DWORD is most definitely not a string, and should not ever be treated as such.
Title: Re: 0x53 Help
Post by: Soul Taker on December 09, 2004, 11:28 PM
I don't understand the huge amount of people that come here with problems and never look at a packet log.  How do you ever hope to figure out the error in what you're sending blindly?
Title: Re: 0x53 Help
Post by: R.a.B.B.i.T on December 10, 2004, 09:25 PM
I did look at the packet logs, and then I looked more closely, which revealed my problem and I have since fixed it (hence the edit in my post saying "I fixed it").