HACKING LESSON 9

Creating / Generating Software Keys / Serial Numbers

The main aim of this chapter is to clear some basic concepts of using Disassembler i.e. how a cracker generates the registration key or Serial number of a software.

Below is the C program which perform the following function –

1).Prompt for a password

2).Display the comparison.

3).Matches the password character by character.


#include stdio.h
#include string.h
#define PASSWORD_SIZE 100
#define PASSWORD "password\n"

int main ()
int count=0;
char buff [PASSWORD_SIZE];
for (;;)
printf ("Enter password:");
fgets (&buff [0], PASSWORD_SIZE,stdin);
if (strcmp (&buff [0], PASSWORD))
printf ("Wrong password\n");
else break;
if (++count>3) return -1;
}
printf ("Password OK\n");
}

Important: This code is not written by me so i cannot guarantee whether it'll work or not.

No comments: