Skip to content

Instantly share code, notes, and snippets.

@OsandaMalith
Last active November 30, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OsandaMalith/9efc39173b528cbef43c to your computer and use it in GitHub Desktop.
Save OsandaMalith/9efc39173b528cbef43c to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
int main() {
char name[61];
size_t i = 0;
int Char;
int Xor;
int total;
int sum;
puts(
"\t\t| Keygenning4newbies CrackMe1\n"
"\t\t| KeyGen coded by @OsandaMalith\n"
"\t\t| http://osandamalith.wordpress.com\n"
);
printf("Enter Name: ");
fgets(name,60,stdin);
if(strlen(name)-1 <= 3 || strlen(name)-1 >= 50) {
fprintf(stderr,"%s","Name should be between 3 to 50 characters.");
exit(-1);
}
while(i < strlen(name) - 1) {
Char = name[i++];
Xor = Char ^ i;
total += Xor;
}
sum = (total << 7) + 6 * Xor;
printf("Serial: %X",sum);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment