• Welcome to Valhalla Legends Archive.
 

[BNCS] SID_AUTH_CHECK [0x51]

Started by mime, November 18, 2009, 10:55 AM

Previous topic - Next topic

pianka

I think you could make the argument that knowing VB6 well does in fact make you a competent programmer.  As a programmer is someone who writes programs, knowing VB6 is a pretty easy way to accomplish that.  However, you could also make the argument that only knowing VB6 doesn't mean you're a competent developer;  where a developer is someone who can work as part of a team building robust applications and systems for real users.

Also, is competency judged simply by the frameworks, languages and paradigms you use?  Would a proficient assembly programmer be incompetent because they don't know how to use .NET?

MyndFyre

It doesn't matter, what platform you're on or what library you're using.  You can be a competent programmer in VB6, Java, C#, C++, C, Ada, Pascal, Python - the list goes on. 

However, it's a pretty commonplace perception that VB6 enables you to program without being competent, very easily.  It forgives you SO MUCH for pretty much anything that you do.

Now, that's not to say that you can't be incompetent and program in other languages.  It's just with VB6 being so widespread, it's gotten into the hands of a lot of stupid people, and their search to be able to get work done has ended up with them infecting the web with a lot of crappy code samples, that happen to function, but nobody knows why.
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.

MyndFyre

An interesting quote I just read applies here:
Quote from: Joel SpolskyA lot of programmers that you might interview these days are apt to consider recursion, pointers, and even data structures to be a silly implementation detail which has been abstracted away by today's many happy programming languages. "When was the last time you had to write a sorting algorithm?" they snicker.

Still, I don't really care. I want my ER doctor to understand anatomy, even if all she has to do is put the computerized defibrillator nodes on my chest and push the big red button, and I want programmers to know programming down to the CPU level, even if Ruby on Rails does read your mind and build a complete Web 2.0 social collaborative networking site for you with three clicks of the mouse.

Source: http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html
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.

Imperceptus

I had to write a jagged sort from scratch a few weeks ago. god it was a nightmare. works but jeeeez
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.

mime

Hello :)

I have questions again...

What to specify in the field cd-key in SID_AUTH_CHECK packet if I play a piracy server and I have no cd-key?

I wrote:
   packet = new BNetPacket(PacketIDs.SID_AUTH_CHECK);
packet.addDWord(clientToken);
packet.addDWord(results.getVerhash());
packet.addDWord(results.getChecksum());
packet.addDWord(0);
packet.addDWord(results.getChecksum());
packet.addString("");
logger.info("\n" + packet);
out.write(packet.getBytes());
out.flush();



How correctly to specify the password in SID_LOGONRESPONSE2?

I wrote:
packet = new BNetPacket(PacketIDs.SID_LOGONRESPONSE2);
packet.addDWord(clientToken);
packet.addDWord(serverToken);
int[] myPass = DoubleHash.doubleHash(password, clientToken, serverToken);
for (int i = 0; i < 5; i++)
    packet.addDWord(myPass[i]);
packet.addNTString(name);
logger.info("\n" + packet);
out.write(packet.getBytes());
out.flush();


My program log:

23.11.2009 0:13:07 bot.core.Bot main
INFO: Create socket and I/O streams...
23.11.2009 0:13:07 bot.core.Bot main
INFO: Send game protocol byte
23.11.2009 0:13:07 bot.core.Bot main
INFO: Build SID_AUTH_INFO packet...
23.11.2009 0:13:07 bot.core.Bot main
INFO: Get version byte...
23.11.2009 0:13:07 bot.core.Bot main
INFO: Version byte=12
23.11.2009 0:13:07 bot.core.Bot main
INFO:
Buffer contents:
ff 50 33 00 00 00 00 00 36 38 58 49 50 58 32 44 .P3.....68XIPX2D
0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 52 55 53 00 20 3e 41 41 ........RUS. >AA
38 4f 00                                        8O.
Length: 51

23.11.2009 0:13:07 bot.core.Bot main
INFO: Sent!
23.11.2009 0:13:07 bot.core.Bot main
INFO: Read response...
23.11.2009 0:13:07 bot.core.Bot main
INFO: Receive packet: 0x25
23.11.2009 0:13:07 bot.core.Bot main
INFO:
Buffer contents:
ff 25 08 00 2a 10 07 04                          .%..*...
Length: 8

23.11.2009 0:13:07 bot.core.Bot main
INFO: Receive packet: 0x50
23.11.2009 0:13:07 bot.core.Bot main
INFO:
Buffer contents:
ff 50 65 00 00 00 00 00 61 4d 33 68 ef 02 00 00 .Pe.....aM3h....
80 75 8e 95 3a e1 c3 01 49 58 38 36 76 65 72 31 .u..:...IX86ver1
2e 6d 70 71 00 41 3d 33 38 34 35 35 38 31 36 33 .mpq.A=384558163
34 20 42 3d 38 38 30 38 32 33 35 38 30 20 43 3d 4 B=880823580 C=
31 33 36 33 39 33 37 31 30 33 20 34 20 41 3d 41 1363937103 4 A=A
2d 53 20 42 3d 42 2d 43 20 43 3d 43 2d 41 20 41 -S B=B-C C=C-A A
3d 41 2d 42 00                                  =A-B.
Length: 101

23.11.2009 0:13:07 bot.core.Bot main
INFO:
Values:
LogonType=0
serverToken=1748192609
udpValue=751
pqFileTim=e127192856230000000
mpqFileName=IX86ver1.mpq
formula=[B@2808b3
23.11.2009 0:13:07 bot.core.Bot main
INFO: Generate clientToken...
23.11.2009 0:13:07 bot.core.Bot main
INFO: clientToken=-1459806719
23.11.2009 0:13:07 bot.core.Bot main
INFO: Start check revison...
23.11.2009 0:13:08 bot.core.Bot main
INFO:
verhash=1
checksum=16780288
staststring=[B@503429
23.11.2009 0:13:08 bot.core.Bot main
INFO:
Buffer contents:
ff 51 18 00 01 1e fd a8 01 00 00 00 00 0c 00 01 .Q..............
00 00 00 00 00 0c 00 01                          ........
Length: 24

23.11.2009 0:13:08 bot.core.Bot main
INFO: Receive packet: 0x51
23.11.2009 0:13:08 bot.core.Bot main
INFO:
Buffer contents:
ff 51 09 00 01 01 00 00 00                      .Q.......
Length: 9

23.11.2009 0:13:08 bot.core.Bot main
INFO: Result:257
01 1e fd a8 61 4d 33 68 e7 a2 73 23 92 f3 ad ec ....aM3h..s#....
1c 16 ac 4a 9f 2c 23 b4 96 7b 59 98              ...J.,#..{Y.
Length: 28

23.11.2009 0:13:08 bot.core.Bot main
INFO:
Buffer contents:
ff 3a 29 00 01 1e fd a8 61 4d 33 68 37 49 6d 19 .:).....aM3h7Im.
7f 38 f2 2c e2 3f 23 d6 80 c0 99 2f db 4a 87 48 8.,.?#..../.J.H
64 72 75 67 66 72 65 65 00                      drugfree.
Length: 41

23.11.2009 0:13:08 bot.core.Bot main
INFO: Receive packet: 0x3a
23.11.2009 0:13:08 bot.core.Bot main
INFO:
Buffer contents:
ff 3a 29 00 01 1e fd a8 61 4d 33 68 37 49 6d 19 .:).....aM3h7Im.
7f 38 f2 2c e2 3f 23 d6 80 c0 99 2f db 4a 87 48 8.,.?#..../.J.H
64 72 75 67 66 72 65 65 00                      drugfree.
Length: 41

23.11.2009 0:13:08 bot.core.Bot main
INFO: Result:a8fd1e01



Please help!

rabbit

First: any password that passes install checks will work on 3rd part servers.

Second: packet.addDWord(results.getChecksum());
packet.addDWord(0);
packet.addDWord(results.getChecksum());
Why are you inserting results.getChecksum() twice?

Third: I don't know what library you're using for your hashing, but it looks fine?
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

mime

Quote
First: any password that passes install checks will work on 3rd part servers.
I do not understand, it is possible more in detail?

Quote
Second: packet.addDWord(results.getChecksum());
packet.addDWord(0);
packet.addDWord(results.getChecksum());
Why are you inserting results.getChecksum() twice?

packet = new BNetPacket(PacketIDs.SID_AUTH_CHECK);
packet.addDWord(clientToken);
packet.addDWord(results.getVerhash());
packet.addDWord(results.getChecksum());
packet.add(0); // CD-key
packet.addNtByteArray(results.getStatstring());
packet.addNTString(""); // username
logger.info("\n" + packet);
out.write(packet.getBytes());
out.flush();


Quote
Third: I don't know what library you're using for your hashing, but it looks fine?
I'm use this classes for hashing :
http://code.google.com/p/jbls2/source/browse/#svn/trunk/JBLS/src/Hashing

mime

Hurrah!!!! I have come into a chat :)

Hdx

1) Dear gone someone butchered JBLS more than Joe/I did!
2) Your password must be double hashes jsut like normal for fake servers as well as real ones
3) For CDKey, you need to send it a valid cdkey IIRC 3333333333333 works.

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

mime

Quote from: Hdx on November 23, 2009, 12:24 AM
1) Dear gone someone butchered JBLS more than Joe/I did!
What?:) I do not understand :(

rabbit

Quote from: mime on November 23, 2009, 03:53 AM
Quote from: Hdx on November 23, 2009, 12:24 AM
1) Dear gone someone butchered JBLS more than Joe/I did!
What?:) I do not understand :(
He said it's a hacked version of a hacked version of JBLS, and it sucks.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Camel

Quote from: Hdx on November 23, 2009, 12:24 AM
3) For CDKey, you need to send it a valid cdkey IIRC 3333333333333 works.
To elaborate, it has to decode. It doesn't have to be accepted by [the real] Battle.net, or probably even have the right product ID.