Date: Mon, 28 Sep 1998 00:43:25 +0200 From: Eivind Eklund <eivind@yes.no> To: kim dong chun <mindmap@netian.com>, freebsd-hackers@FreeBSD.ORG Subject: Re: your mail Message-ID: <19980928004325.25164@follo.net> In-Reply-To: <199809272149.GAA25116@mail.netian.com>; from kim dong chun on Mon, Sep 28, 1998 at 06:49:12AM %2B0900 References: <199809272149.GAA25116@mail.netian.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 28, 1998 at 06:49:12AM +0900, kim dong chun wrote:
> Hello!
>
> My name is dong chun kim.
>
> I want crack file that is mp3play.ocx
>
> Help me... !
>
> Can You?
Yes. Here is pseudo-code for how to do this:
filesize = (Get the size of the file)
bufferA = malloc(filesize);
BufferB = malloc(filesize);
read-your-file-into-bufferA
rnd = fopen("/dev/random", "r");
/* Optimize for the case where bufferA already contain good data - a
do-while would be a few cycles faster on average, but not for the
simple case */
memcpy(bufferB, bufferA, filesize);
while (bufferB does not contain a program doing what you want) {
memcpy(bufferB, bufferA, filesize);
for (i=0; i<filesize; i++) {
bufferB[i] ^= getchar(rnd);
}
}
... and you're done! Now, you just have to write the evaluation
function.
Eivind.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980928004325.25164>
