Valhalla Legends Forums Archive | Battle.net Bot Development | 0x51 Now Received With Invalid CD Key

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

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?
April 9, 2007, 12:43 AM
Yegg
You got ipbanned... why didn't you just use another server instead of wait 2 weeks?
April 9, 2007, 1:22 AM
Godzilla
[quote author=Yegg link=topic=16600.msg167730#msg167730 date=1176081754]
You got ipbanned... why didn't you just use another server instead of wait 2 weeks?
[/quote]
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?
April 9, 2007, 1:28 AM
l2k-Shadow
[quote author=Godzilla link=topic=16600.msg167731#msg167731 date=1176082095]
[quote author=Yegg link=topic=16600.msg167730#msg167730 date=1176081754]
You got ipbanned... why didn't you just use another server instead of wait 2 weeks?
[/quote]
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?
[/quote]

hop on a proxy and provide a packet log.
April 9, 2007, 1:32 AM
JoeTheOdd
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.
April 9, 2007, 4:10 AM
l2k-Shadow
[quote author=Joe[x86] 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.
[/quote]

Depends on ISP, my IP hasn't changed when I unplugged my modem for 2 weeks.
April 9, 2007, 4:29 AM
BreW
[quote author=Godzilla link=topic=16600.msg167731#msg167731 date=1176082095]
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?
[/quote]
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...
April 10, 2007, 3:41 AM
Baroness
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.
April 10, 2007, 12:18 PM
BreW
[quote author=Baroness link=topic=16600.msg167781#msg167781 date=1176207532]
On a side note, post your 'pck0x51_DecodedCDKey1' function.
[/quote]

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. ^^;;
April 10, 2007, 2:19 PM
Godzilla
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.
[code]Dim pck0x51_DecodedKey1 as new CdKey(MyCDKeyString)[/code]

Maybe its the MBNCSUtil im using? It's MBNCSUtil 2.0.0.10 which supports .net framework 2.0 which is what im using.
April 10, 2007, 3:00 PM
Myndfyr
[quote author=Godzilla link=topic=16600.msg167785#msg167785 date=1176217224]
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.
[code]Dim pck0x51_DecodedKey1 as new CdKey(MyCDKeyString)[/code]

Maybe its the MBNCSUtil im using? It's MBNCSUtil 2.0.0.10 which supports .net framework 2.0 which is what im using.
[/quote]
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):

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

That replaces non-word characters (any non-alphanumeric) with an empty string.
April 10, 2007, 4:20 PM
Godzilla
should i convert the cd key to lower case before decoding it?
April 11, 2007, 5:19 AM
Barabajagal
Upper Case, i think.
April 11, 2007, 5:47 AM
Baroness
[quote author=ŖėåłïťŷŔĩρρŀě link=topic=16600.msg167804#msg167804 date=1176270445]
Upper Case, i think.
[/quote]

Correct
April 11, 2007, 6:12 AM
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)
April 11, 2007, 3:02 PM
MysT_DooM
you got a packet log of the connection?
April 11, 2007, 4:13 PM
Godzilla
[hr]
[quote author=Godzilla link=topic=16600.msg167729#msg167729 date=1176079389]
I forgot to packet log it, but i have the code for you..
[/quote]
[hr]
...
April 11, 2007, 11:24 PM
l2k-Shadow
[quote author=Godzilla link=topic=16600.msg167828#msg167828 date=1176303743]
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)
[/quote]

The code looks OK, if you could get on a proxy and get a packet log, we'd be able to help you better.
April 12, 2007, 12:00 AM
BreW
[quote author=Godzilla link=topic=16600.msg167843#msg167843 date=1176333890]
[hr]
[quote author=Godzilla link=topic=16600.msg167729#msg167729 date=1176079389]
I forgot to packet log it, but i have the code for you..
[/quote]
[hr]
...
[/quote]
*hint* Packetlog it...? We're sorry but the code doesn't help very much. (It looks perfectly okay) Maybe if we knew what value is acually causing you to receive a temporary restriction we may be able to help you correct this error. Try getting something like packetmon and paste the outbound 0x51 here.
April 12, 2007, 12:12 AM
Explicit[nK]
brew, why is it that you suggest something that's been said twice already? ..
April 12, 2007, 1:58 AM
Godzilla
Thanks MyndFyre, i got it working now without ip ban :P. I guess that little function you gave me really helped. is vbNullString that different from String.empty?

--- Edit:

I just connect again with the same settings and received invalid cd key again (when before i got no error and proceded to 0x53). Here's the log:

[code]
Send 0x51:
0000  00 09 5b cd 8a 38 00 0c 6e 99 1a 1b 08 00 45 00  ..[..8..n.....E.
0010  00 92 9a 29 40 00 80 06 0c 32 c0 a8 00 02 3f f1  ...)@....2....?.
0020  53 6f 05 b8 17 e0 50 9c 38 c4 a1 8a ff 8d 50 18  So....P.8.....P.
0030  ff 0f 00 38 00 00 ff 51 6a 00 5c 83 c8 00 77 18  ...8...Qj.\...w.
0040  15 01 1b 3f 06 93 01 00 00 00 00 00 00 00 1a 00  ...?............
0050  00 00 0e 00 00 00 0a 66 70 00 00 00 00 00 13 57  .......fp......W
0060  83 ca 2d d9 50 be 5e f1 21 74 f2 01 d0 68 21 30  ..-.P.^.!t...h!0
0070  36 6d 77 61 72 33 2e 65 78 65 20 31 32 2f 32 38  6mwar3.exe 12/28
0080  2f 30 36 20 32 30 3a 33 35 3a 32 31 20 31 35 37  /06 20:35:21 157
0090  32 33 30 37 00 42 4e 69 2d 50 6f 77 65 52 2e 00  2307.BNi-PoweR..
00a0

Receive 0x51:
0000  00 0c 6e 99 1a 1b 00 09 5b cd 8a 38 08 00 45 90  ..n.....[..8..E.
0010  00 31 87 5d 00 00 75 06 69 cf 3f f1 53 6f c0 a8  .1.]..u.i.?.So..
0020  00 02 17 e0 05 b8 a1 8a ff 8d 50 9c 39 2e 50 18  ..........P.9.P.
0030  ff 5d 0b 8c 00 00 ff 51 09 00 00 02 00 00 00    .].....Q.......[/code]
April 12, 2007, 2:36 AM

Search