• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Godzilla

#1
wow omg.. I'm such an idiot. If i looked more closely to my debugging and variable values I could have easily found the problem:

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.gll"

funny.
This caused my code to stop executing because my Files for the CheckRevision were wrong :P
#2
Quote from: Kp on April 23, 2007, 09:47 AM
Does execution return from creating the second BncsPacket?
Yes, the second packet is created (only the 4 byte header), then the moment I .Insert() a value the code stops, but I do not get failures. Just nothing happens when im debugging it as if nothing has happened.

Would you guys like me to post some of my code?
btw MyndFyre i used your PacketId enum.
#3
Nope. I get no warnings, no errors. It's the bncspacket because when I was debugging it I tested it in multiple ways, and it's always the second BncsPacket i create where it stops
#4
This time it's about C# and MBNCSUtil:
I just decided to switch over to C# so I'm trying to re-write my code from VB. My question is, how come in C# it's only letting me declare a "new" BncsPacket variable once? The first BncsPacket that the code runs through will work, all the following ones won't the code stops executing when I insert a value to the BncsPacket.
For example:
            BncsPacket WorkingPacket = new BncsPacket(WhateverByte);
            WorkingPacket.Insert(WhateverValue);
            BncsPacket NotWorkingPacket = new BncsPacket(WhateverByte);
            //code fom this line and below will not execute
            NotWorkingPacket.Insert(WhateverValue);
            NotWorkingPacket.Insert(WhateverValue);

Sort of unclear example but if any answers would be greatly appreciated.. im unfamiliar with C#
#5
So it doesn't affect the logon... ?
#6
Am I able to send BNLS_CDKEY (0x01)  to bnet right after receiving 0x50 without breaking the logon? (using war3)Example:

Send Protocol Byte (1)
Send 0x50
Receive 0x25
Receive 0x50
Send 0x25 (Optional)
Send 0x01 (BNLS_CDKEY)      <---
Receive 0x01 (BNLS_CDKEY)   <---
Send 0x51
Receive 0x51
Send 0x53
Receive 0x53
Send 0x54
Receive 0x54
Send 0x45
Send 0x0A
#7
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:


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.......

#8


Quote from: Godzilla on April 08, 2007, 07:43 PM
I forgot to packet log it, but i have the code for you..


...
#9
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)
#10
should i convert the cd key to lower case before decoding it?
#11
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.
#12
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?
#13
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?
#14
Quote from: l)ragon on March 28, 2007, 01:21 AM
Shouldent be 2 weeks lol maybe 2 hours.
no it's actually 2 weeks. its on the battle.net forum sticky.
#15
Solved that part because my ValueString was bad.
I might still have another problem though, ill come back an modify this if i do.

oh and, I just received Invalid CD Key for using my own VALID key... am i banned for 2 weeks now?.. wow gay.