Skip to content

Commit

Permalink
Add python bindings & binary emulation test for riscv 64/32
Browse files Browse the repository at this point in the history
  • Loading branch information
Antwy committed Jun 4, 2024
1 parent 302ec35 commit 781f99b
Show file tree
Hide file tree
Showing 16 changed files with 2,120 additions and 24 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

#include <stdio.h>
#include <stdlib.h>

char *serial = "\x31\x3e\x3d\x26\x31";

int check(char *ptr)
{
int i;
int hash = 0xABCD;

for (i = 0; ptr[i]; i++)
hash += ptr[i] ^ serial[i % 5];

return hash;
}

int main(int ac, char **av)
{
int ret;

if (ac != 2)
return -1;

ret = check(av[1]);
if (ret == 0xad6d)
printf("Win\n");
else
printf("fail\n");

return 0;
}

Loading

0 comments on commit 781f99b

Please sign in to comment.