Skip to content

Instantly share code, notes, and snippets.

@bananaappletw
Created May 16, 2017 10:33
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 bananaappletw/b4e31f3d660dd3b358a8cf44c29941ba to your computer and use it in GitHub Desktop.
Save bananaappletw/b4e31f3d660dd3b358a8cf44c29941ba to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
char *serial = "\x31\x3e\x3d\x26\x31";
int check(char *ptr)
{
int i = 0;
while (i < 5){
if (((ptr[i] - 1) ^ 0x55) != serial[i])
return 1;
i++;
}
return 0;
}
int main(int ac, char **av)
{
int ret;
if (ac != 2)
return -1;
ret = check(av[1]);
if (ret == 0)
printf("Win\n");
else
printf("fail\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment