• Welcome to Valhalla Legends Archive.
 

0x101: Unknown Version

Started by Tazo, June 16, 2003, 08:58 AM

Previous topic - Next topic

Tazo

I'm getting the response 0x101 on my 0x51..I don't know whats wrong with it, take a look..


Public Sub 0x50()
   With PBuffer
       .InsertDWORD &H0
       .InsertNonNTString "68XIPXES"
       .InsertDWORD &HC7
       .InsertDWORD &H0
       .InsertDWORD &H0
       .InsertDWORD &H360
       .InsertDWORD GetSystemDefaultLCID
       .InsertDWORD GetSystemDefaultLangID
       .InsertNTString "USA"
       .InsertNTString "United States"
       .SendPacket &H50
   End With
End Sub

Thanks in advance..
By the way, I'm getting the error on the 0x50, not the 0x51.

TheMinistered

#1

Private Const SID_AUTH_INFO as Long = &H50

Public Sub Send0x50(ByVal SocketHandle As Long, ByVal VersionByte As Long)
   Set PacketBuffer = New CPacketBuffer
       PacketBuffer.InsertDWORD &H0
       PacketBuffer.InsertDWORD PacketBuffer.GetDWORD(StrReverse("IX86"))
       PacketBuffer.InsertDWORD PacketBuffer.GetDWORD(StrReverse("SEXP"))
       PacketBuffer.InsertDWORD VersionByte
       PacketBuffer.InsertDWORD &H0
       PacketBuffer.InsertDWORD &H0
       PacketBuffer.InsertDWORD &H0
       PacketBuffer.InsertDWORD GetSystemDefaultLCID
       PacketBuffer.InsertDWORD GetSystemDefaultLangID
       PacketBuffer.InsertNTString "USA"
       PacketBuffer.InsertNTString "United States"
       PacketBuffer.SendBNCSPacket SocketHandle, SID_AUTH_INFO
   Set PacketBuffer = Nothing
End Sub


You should attempt not to hardcode anything...

TheMinistered

while i'm at it I think I will post a few more gems! :)


Public Sub Send0x10(ByVal SocketHandle As Long)
   Set PacketBuffer = New CPacketBuffer
       PacketBuffer.InsertDWORD &H2
       PacketBuffer.SendBNLSPacket SocketHandle, &H10
   Set PacketBuffer = Nothing
End Sub

Public Sub Send0x0E(ByVal SocketHandle As Long, ByVal BotID As String)
   Set PacketBuffer = New CPacketBuffer
       PacketBuffer.InsertNTString BotID
       PacketBuffer.SendBNLSPacket SocketHandle, &HE
   Set PacketBuffer = Nothing
End Sub

Public Sub Send0x0F(ByVal SocketHandle As Long, ByVal ServerCode As Long, ByVal BotPassword As String)
   Set PacketBuffer = New CPacketBuffer
       PacketBuffer.InsertDWORD BNLSChecksum(BotPassword, ServerCode)
       PacketBuffer.SendBNLSPacket SocketHandle, &HF
   Set PacketBuffer = Nothing
End Sub

Skywing

Quote from: TheMinistered on June 16, 2003, 11:24 AM

Private Const SID_AUTH_INFO as Long = &H50

Public Sub Send0x50(ByVal SocketHandle As Long, ByVal VersionByte As Long)
   Set PacketBuffer = New CPacketBuffer
       PacketBuffer.InsertDWORD &H0
       PacketBuffer.InsertDWORD PacketBuffer.GetDWORD(StrReverse("IX86SEXP"))
       PacketBuffer.InsertDWORD VersionByte
       PacketBuffer.InsertDWORD &H0
       PacketBuffer.InsertDWORD &H0
       PacketBuffer.InsertDWORD &H0
       PacketBuffer.InsertDWORD GetSystemDefaultLCID
       PacketBuffer.InsertDWORD GetSystemDefaultLangID
       PacketBuffer.InsertNTString "USA"
       PacketBuffer.InsertNTString "United States"
       PacketBuffer.SendBNCSPacket SocketHandle, SID_AUTH_INFO
   Set PacketBuffer = Nothing
End Sub


You should attempt not to hardcode anything...
Err... You just hardcoded the game locale and the country shortname/country name.

TheMinistered

#4
Yes, I did... that is why I said you should _attempt_ to not hardcode.   By the way, your problem is this "68XIPXES" line... check mine for correctness :D

Arta

Quote from: laurion on June 16, 2003, 08:58 AM
I'm getting the response 0x101 on my 0x51..I don't know whats wrong with it, take a look..

When does the error occur? If you get SID_AUTH_INFO wrong, you'll never get as far as receiving 0x101 in SID_AUTH_CHECK. Battle.net would just disconnect you, and most likely IPBan too. If you're getting invalid version, your problem will be with SID_AUTH_CHECK, unless you're getting your version byte wrong, which you aren't.

TheMinistered

I don't *think* that is right arta... I posted wrong code (but edited it later), if you try using the code skywing quoted it will weild undesired results without a socket closure (i *think*)

Arta

You don't think what's right?

c0ol

arta is saying that if 0x50 is wrong, you will never get around to recieving 0x51, if you are than ur 0x50 is correct.

Camel

Quote from: Skywing on June 16, 2003, 11:33 AMErr... You just hardcoded the game locale and the country shortname/country name.
what's wrong with that? blizz would have to decide to ban entire countries for that to become a flaw in one's bot...
i just send random values. iirc, the only time it makes a difference is for /time (unless you join country specific channels)

Skywing

#10
Quote from: Camel on June 16, 2003, 09:57 PM
Quote from: Skywing on June 16, 2003, 11:33 AMErr... You just hardcoded the game locale and the country shortname/country name.
what's wrong with that? blizz would have to decide to ban entire countries for that to become a flaw in one's bot...
i just send random values. iirc, the only time it makes a difference is for /time (unless you join country specific channels)
What's wrong with that is it sucks for localization purposes to assume English and ignore the user's settings.  Not to mention that it changes what languages friends notifications will be sent in.

Tazo

Now I have


Public Sub 0x50()
   With PBuffer
       .InsertDWORD &H0
       .InsertDWORD PBuffer.GetDWORD(StrReverse("IX86"))
       .InsertDWORD PBuffer.GetDWORD(StrReverse("SEXP"))
       .InsertDWORD &HC7
       .InsertDWORD &H0
       .InsertDWORD &H0
       .InsertDWORD &H360
       .InsertDWORD GetSystemDefaultLCID
       .InsertDWORD GetSystemDefaultLangID
       .InsertNTString "USA"
       .InsertNTString "United States"
       .SendPacket &H50
   End With
End Sub

and still no luck..

Camel

Quote from: Skywing on June 17, 2003, 02:39 AM
Not to mention that it changes what languages friends notifications will be sent in.
perhaps that's a reason to assume it's english?

iago

Because you think that everybody in the world speaks english?
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Zakath

Wasn't one of the main reasons NBBot was originally created because the CHAT protocol didn't support certain Swedish characters?

In any case, languages can be a big deal. Ask any of the many members of vL and this forum who live on the other side of the big lake from those of us in North America.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.