• Welcome to Valhalla Legends Archive.
 

lockdown source

Started by Rob, July 30, 2007, 12:44 AM

Previous topic - Next topic

warz

I don't recall ever arguing about that... because, well, it does use third party code - I wouldn't have ever denied that. I was asking iago, also. Although you may have given me what you think is the probable answer, it still cannot be the answer I'm looking for, considering the answer I'm looking for will not be coming from you. If it were coming from you, it would not have been the answer that I was looking for, therefor making it not the answer to my question at all. In the event that I thought iago would not give a reply, I would have refrained from asking the question all together, so that I may avoid receiving an answer that isn't really the answer. Sometimes, you have to be straight forward so that you get the answer that you're looking for. (which cannot be given by anyone other than the one)

brew

Man, warz, stop being so lame.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

iago

It's incomplete because there's code missing.

It relies on proprietary code because it's incomplete.

It's not quite the same :P

(I'm not trying to complain or anything, I'm not exactly putting my version on a pedestal. I was just explaining what the differences are.)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


warz

#18
incomplete in a sense, i guess. complete in another sense.

Quote from: brew on July 31, 2007, 06:44 PM
Man, warz, stop being so lame.

how's the vampire life style treating ya?

brew

Quote from: betawarz on July 31, 2007, 11:20 PM
Quote from: brew on July 31, 2007, 06:44 PM
Man, warz, stop being so lame.
how's the vampire life style treating ya?
Dunno what you're talking about, I told you that was a joke about 100 times, how many more until you understand?
Heh. Your lockdown checkrevision code doesn't exactly work either, I keep getting invalid version:
Quote
Checksum == -1885853027
exeVersion == 17760257
exeInfo == $/hÚÉf°ÃÚ=á@³#
[10:41:35 AM] [BNET] Sending 0x51...
[10:41:35 AM] [BNET] Received 0x51!
[10:41:35 AM] [BNET] Invalid product version.
[10:41:35 AM] [BNET] Disconnected.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Yegg

Quote from: brew on August 01, 2007, 09:42 AM
Quote from: betawarz on July 31, 2007, 11:20 PM
Quote from: brew on July 31, 2007, 06:44 PM
Man, warz, stop being so lame.
how's the vampire life style treating ya?
Dunno what you're talking about, I told you that was a joke about 100 times, how many more until you understand?
Heh. Your lockdown checkrevision code doesn't exactly work either, I keep getting invalid version:
Quote
Checksum == -1885853027
exeVersion == 17760257
exeInfo == $/hÚÉf°ÃÚ=á@³#
[10:41:35 AM] [BNET] Sending 0x51...
[10:41:35 AM] [BNET] Received 0x51!
[10:41:35 AM] [BNET] Invalid product version.
[10:41:35 AM] [BNET] Disconnected.

Quote from: brew on July 31, 2007, 07:20 AM
warz's version is by far the easiest to work with.

warz

yeah. don't take anything brew says to heart. i don't think i have taken him seriously once, ever. also, any problems he mentions, or complains about, with anything he does, i generally assume it's an error he is making before i assume it's a problem with what he's using. my assumptions have been correct just about every time, also.

Yegg

Quote from: betawarz on August 01, 2007, 11:52 AM
yeah. don't take anything brew says to heart. i don't think i have taken him seriously once, ever. also, any problems he mentions, or complains about, with anything he does, i generally assume it's an error he is making before i assume it's a problem with what he's using. my assumptions have been correct just about every time, also.

I know. I wasn't implying that your implementation was bad or less than anyone else's. Thought I'd remind brew know that yours was the "easiest to work with" according to him. I know it's not working due to his own mistake(s), I just find it funny that he makes that claim and about a day later he' s experiencing problems.

brew

Grrr. Does it matter if i open the dx buffer with fopen() instead of fopen_s()? i heard i can't use it because it's in VC++ 7 and up only.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

iago

I don't think there's anything wrong with using fopen() as long as you're careful to check the return value to ensure the file actually opened.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


l2k-Shadow

Quote from: brew on August 01, 2007, 09:22 PM
Grrr. Does it matter if i open the dx buffer with fopen() instead of fopen_s()? i heard i can't use it because it's in VC++ 7 and up only.

no. i just dled and compiled the code and it works just fine. you must be doing something incorrectly.
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

#26
Quote from: l2k-Shadow on August 01, 2007, 09:40 PM
Quote from: brew on August 01, 2007, 09:22 PM
Grrr. Does it matter if i open the dx buffer with fopen() instead of fopen_s()? i heard i can't use it because it's in VC++ 7 and up only.

no. i just dled and compiled the code and it works just fine. you must be doing something incorrectly.
With VC++ 6? That's what I have, it doesn't recognize fopen_s.
anyways..

void Parse0x50(char *data) {
char sdfg1[4], asdf[512], mpqName[32], ChecksumFormula[64], tmpCDKey[64], buf[256];
char *files[5];
int i = 0;
memcpy(sdfg1, data + 8, 4);
strcpy(mpqName, data + 24);
strcpy(ChecksumFormula, data + 25 + strlen(mpqName));
ClientToken = GetTickCount() + 7000;
ServerToken = GetDWORD(sdfg1);
strcpy(tmpCDKey, bot.cdkey);
if (!DecodeCDKey(tmpCDKey))
AddChat(vbRed, "[BNET] Invalid CDKey!");
HashCDKey(KeyHash, ServerToken, ProductValue, PublicValue, PrivateValue, ClientToken);
GetCurrentDirectory(sizeof(buf), buf);
strcat(buf, "\\Hashes\\STAR\\");
while (i < 5) {
files[i] = (char *)malloc(256);
strcpy(files[i], buf);
i++;
}
mpqName[strlen(mpqName) - 4] = 0;
strcat(mpqName, ".dll");
memset(buf, 0, sizeof(buf));
GetCurrentDirectory(sizeof(buf), buf);
strcat(buf, "\\Hashes\\DLLs\\");
strcat(buf, mpqName);
strcat(files[0], "starcraft.exe");
strcat(files[1], "storm.dll");
strcat(files[2], "battle.snp");
strcpy(files[3], buf);
strcat(files[4], "sexp.bin");
int crresult = CheckRevisionLD(files[0], files[1], files[2], ChecksumFormula, exeVersion, Checksum, exeInfo, files[3], files[4]);
if (crresult) {
memset(buf, 0, sizeof(buf));
sprintf(buf, "Failed Lockdown CheckRevision! [error %d]", crresult);
AddChat(vbRed, buf);
}
sprintf(asdf, "\nClientToken == %u\nServerToken == %u\nmpqName == %s\nChecksumFormula == %s\nCDKey == %s\nProductValue == %d\nPublicValue == %d\n"
"PrivateValue == %d\nKeyHash == %s\nChecksum == %d\nexeVersion == %d\nexeInfo == %s",
ClientToken, ServerToken, mpqName, ChecksumFormula, bot.cdkey, ProductValue,
PublicValue, PrivateValue, KeyHash, Checksum, exeVersion, exeInfo);
AddChat(vbCyan, asdf);
Send0x51();
}


amirite?

[Edit: broke up code statement to avoid breaking the table.]
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Kp

brew: you are leaking memory.  You are also using unchecked buffer operations, in some cases with the buffer input derived from a clearly untrustworthy source.  You should fix both of those before you continue debugging the actual problem.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

brew

#28
Okay so i added the following to the end of it

i ^= i;
while (i < 5) {
free(files[i]);
i++;
}

That should fix the memory leak, now what?? :(
and what do you mean by unchecked buffer operations, just not setting the array to 0 before using it?
I figured that'd be fine, as you can see i use strcat and strcpy so on (which tacks on the null char for you). So what's wrong with that? And what is the actual problem anyways?
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Yegg

What is the purpose of i ^= i? Why not just i = 0?

|