• Welcome to Valhalla Legends Archive.
 

0x51 Now Received With Invalid CD Key

Started by Godzilla, April 08, 2007, 07:43 PM

Previous topic - Next topic

Godzilla

Ok, so ive searched the forums, ive found a few but none of them solved my problem. I am receiving an invalid cd key resopnse from Battle.net everytime i connect, and its really slowing my bot creation down because of the damn 2 week ip ban. (Yes i just waited 2 weeks and reconnected and banned for another 2 weeks... laugh all you want.)

I forgot to packet log it, but i have the code for you..

    Public Sub SEND_0x51(ByVal ClientToken As UInteger, ByVal ServerToken As UInteger, ByVal MPQFileName As String, ByVal ValueString As String)

        Dim pck0x51 As New BncsPacket(SID_AUTH_CHECK)

        Dim CheckRevision As Integer
        Dim MPQNumber As Byte
        Dim EXEInfo As String
        Dim EXEVersion As Integer
        Dim Files(2) As String
        Dim pck0x51_DecodedCDKey1 As New CdKey(strConnectedCDKey)

        MPQNumber = MBNCSUtil.CheckRevision.ExtractMPQNumber(MPQFileName)

        With pck0x51

            If strConnectedProduct = "Warcraft III RoC" Then

                Files(0) = "C:\Program Files\Warcraft III\war3.exe"
                Files(1) = "C:\Program Files\Warcraft III\storm.dll"
                Files(2) = "C:\Program Files\Warcraft III\game.dll"

                EXEVersion = MBNCSUtil.CheckRevision.GetExeInfo(Files(0), EXEInfo)
                CheckRevision = MBNCSUtil.CheckRevision.DoCheckRevision(ValueString, Files, MPQNumber)

                .Insert(ClientToken)
                .Insert(EXEVersion)
                .Insert(CheckRevision)
                .Insert(1)
                .Insert(False)

                .Insert(pck0x51_DecodedCDKey1.Key.Length)
                .Insert(pck0x51_DecodedCDKey1.Product)
                .Insert(pck0x51_DecodedCDKey1.Value1)
                .Insert(&H0)
                .Insert(pck0x51_DecodedCDKey1.GetHash(ClientToken, ServerToken))

                .InsertCString(EXEInfo)
                .InsertCString(strConnectedUsername)

                AddChat(frmMain.txtChatRoom, Color.Yellow, "-> Sending: 0x51! - [" & .GetData().Length & " Bytes]")
                frmMain.winSock.SendData(.GetData())

            End If

        End With

    End Sub


oh and i have another minor question... im getting the warning "Could not load file or assembly 'Interop.VBRUN, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." and i didn't even touch those files and now it's not showing the designer for any form anymore. Anyone suggestions?

Yegg

You got ipbanned... why didn't you just use another server instead of wait 2 weeks?

Godzilla

Quote from: Yegg on April 08, 2007, 08:22 PM
You got ipbanned... why didn't you just use another server instead of wait 2 weeks?
because im banned from all realms, luckily on 3 servers on east im unbanned so i just play there while i wait for unbanning. How about helping me with the problem?

l2k-Shadow

Quote from: Godzilla on April 08, 2007, 08:28 PM
Quote from: Yegg on April 08, 2007, 08:22 PM
You got ipbanned... why didn't you just use another server instead of wait 2 weeks?
because im banned from all realms, luckily on 3 servers on east im unbanned so i just play there while i wait for unbanning. How about helping me with the problem?

hop on a proxy and provide a packet log.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Joe[x86]

Unplug your modem from your phone line / cable line, go for a walk (a long walk, give it a half hour to be safe) then come back and plug it in again. By then I'd hope your IP had changed.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

l2k-Shadow

Quote from: Joex86] link=topic=16600.msg167735#msg167735 date=1176091809]
Unplug your modem from your phone line / cable line, go for a walk (a long walk, give it a half hour to be safe) then come back and plug it in again. By then I'd hope your IP had changed.

Depends on ISP, my IP hasn't changed when I unplugged my modem for 2 weeks.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

brew

Quote from: Godzilla on April 08, 2007, 08:28 PM
because im banned from all realms, luckily on 3 servers on east im unbanned so i just play there while i wait for unbanning. How about helping me with the problem?
Acually it's 2 days (unless they changed it again)
And next chance you get, be sure to debug.print ALL the values you're sending in the 0x51. paste them here (censor out the public value of the cdkey though i guess if it's non-zero)
I really doubt its that big of a problem maybe you forgot to just set a value to one of the variables. If something's 0 in a packet to bnet, it's probably not supposed to be...
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Baroness

#7
Well firstly, are you sure the CDKey is actually valid?

I looked at the code, there doesn't seem to be any problem with it.

On a side note, post your 'pck0x51_DecodedCDKey1' function.

brew

Quote from: Baroness on April 10, 2007, 07:18 AM
On a side note, post your 'pck0x51_DecodedCDKey1' function.

I think that's built into MBNCSUtil... maybe he's parsing that wrong? Eh.. Try using this cdkey: 3623550815009
And also make sure you remove ALL spaces and/or dashes before you decode it. ^^;;
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Godzilla

#9
I have removed all dashes and spaces simply by mystringvariable.replace("whatiwant", vbnullstring) etc.

pck0x51_DecodedKey1 or whatever i named it as (remember i havent added more code to my bot in a while so i forget some)  is a variable.
Dim pck0x51_DecodedKey1 as new CdKey(MyCDKeyString)

Maybe its the MBNCSUtil im using? It's MBNCSUtil 2.0.0.10 which supports .net framework 2.0 which is what im using.

MyndFyre

Quote from: Godzilla on April 10, 2007, 10:00 AM
I have removed all dashes and spaces simply by mystringvariable.replace("whatiwant", vbnullstring) etc.

pck0x51_DecodedKey1 or whatever i named it as (remember i havent added more code to my bot in a while so i forget some)  is a variable.
Dim pck0x51_DecodedKey1 as new CdKey(MyCDKeyString)

Maybe its the MBNCSUtil im using? It's MBNCSUtil 2.0.0.10 which supports .net framework 2.0 which is what im using.
Doubtful.  I've never had reports of not processing CD keys correctly.

Instead of using that mystringvariable.replace call, try the following (I'm assuming you're using VB.net):


MyCDKeyString = System.Text.RegularExpressions.Regex.Replace(MyCDKeyString, "\W", String.Empty)


That replaces non-word characters (any non-alphanumeric) with an empty string.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Godzilla

should i convert the cd key to lower case before decoding it?

Barabajagal



Godzilla

Well, even before i started this topic, I have typed my cd key in upper case and still had the same results. ATM i just connected on stealthbot with the same cd key (so its not invalid)