• Welcome to Valhalla Legends Archive.
 

[C++] 0x51

Started by Spilled, November 01, 2005, 02:51 AM

Previous topic - Next topic

Spilled

When I build up 0x51 and send it, Battle.net rejects my packet for some reason. I'm thinking its because of the HashedData not being correct but I'm not totally sure.

Here's a packetlog of 0x51:
5  Hide  Hide  112  Send 
0000  FF 51 6F 00 25 85 4B 1F 09 03 01 01 26 2A 4A AA    .Qo.%.K.....&*J.
0010  01 00 00 00 00 00 00 00 0D 00 00 00 01 00 00 00    ................
0020  51 DD 64 00 00 00 00 00 A8 C3 40 7E 5B 4A E6 AA    Q.d.......@~[J..
0030  3B 04 7A 3F B9 F2 30 85 E0 D4 66 32 73 74 61 72    ;.z?..0...f2star
0040  63 72 61 66 74 2E 65 78 65 20 30 39 2F 30 37 2F    craft.exe 09/07/
0050  30 35 20 31 39 3A 30 36 3A 34 31 20 31 30 39 33    05 19:06:41 1093
0060  36 33 32 00 53 70 69 6C 6C 65 64 5B 44 57 5D 00    632.Spilled[DW].

Can you see why it's being rejected? If you need code, feel free to ask and ill show some but I believe this will be enough to help figure out the problem.

Thanks in advance!

Spilled

Solved thanks to Hdx over pm.

Problem: WORD packet length.

MyndFyre

Quote from: Spilled[DW] on November 01, 2005, 03:11 AM
Solved thanks to Hdx over pm.

Problem: WORD packet length.
Your packet length looks exactly right.  What's wrong with it?
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.

Spilled

#3
Quote from: MyndFyre on November 01, 2005, 11:23 AM
Quote from: Spilled[DW] on November 01, 2005, 03:11 AM
Solved thanks to Hdx over pm.

Problem: WORD packet length.
Your packet length looks exactly right.  What's wrong with it?

Was too short cutting off the last null terminator. 0x70 not 0x6F.

Edit:

New packet log:


5  Hide  Hide  112  Send 
0000  FF 51 70 00 CC 1F 5B 19 09 03 01 01 27 DA 28 57    .Qp...[.....'.(W
0010  01 00 00 00 00 00 00 00 0D 00 00 00 01 00 00 00    ................
0020  51 DD 64 00 00 00 00 00 41 B4 EC AF C9 C9 43 5C    Q.d.....A.....C\
0030  9B 9E 08 5E F6 FF DC 35 70 70 DB A0 73 74 61 72    ...^...5pp..star
0040  63 72 61 66 74 2E 65 78 65 20 30 39 2F 30 37 2F    craft.exe 09/07/
0050  30 35 20 31 39 3A 30 36 3A 34 31 20 31 30 39 33    05 19:06:41 1093
0060  36 33 32 00 53 70 69 6C 6C 65 64 5B 44 57 5D 00    632.Spilled[DW].



new:
0000  FF 51 70 00 CC 1F 5B 19 09 03 01 01 27 DA 28 57    .Qp...[.....'.(W

old:
0000  FF 51 6F 00 25 85 4B 1F 09 03 01 01 26 2A 4A AA    .Qo.%.K.....&*J.

Spilled

Another problem with 0x51 I am having is the switch statement to see the results.

What im doing is the result like so:


        case 0x51:
             {
             unsigned long ulResult = *(unsigned long *)(strData+4);
             cout << ulResult << endl;
             switch(ulResult)
             {
               case 0x000:
                    cout << "0x000";
                    break;
               case 0x200:
                    cout << "0x200";
                    break;
               case 0x201:
                    cout << "0x201";
                    break;
               case 0x202:
                    cout << "0x202";
                    break;
               case 0x203:
                    cout << "0x203";
                    break;
               default:
                       break;
               }
        }       
        break;


But it is erroring and I cannot figure out why.
Im tried other things also but none seem to work... Any ideas guys? btw I just brought this topic back to life because i thought i would be pointless to start another one on the same topic. Thanks in advance all!

Joe[x86]

cout << ulResult << endl;

Might help to do

cout << hex << ulResult << end;

That'll print it out in hex. Probably easier to read that way.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

Spilled

Solved.

Getting 0x200 which is Invalid key response so ima go work on that. Thx for your help joe and keep checking back plz just incase i need help with the 0x200 response. Thanks all