diff --git a/duck/antideb.c b/duck/antideb.c new file mode 100644 index 0000000..8a93a9f --- /dev/null +++ b/duck/antideb.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#define SIZE (1024*1024) + +int main() { + FILE *in = fopen("antideb", "r"); + FILE *out = fopen("antideb_patched", "wb"); + + char buffer[SIZE]; + size_t bytes; + + while (0 < (bytes = fread(buffer, 1, sizeof(buffer), in))) + fwrite(buffer, 1, bytes, out); + + long int offset = 0x5fa; + uint8_t new = 0x74; + + fseek(out, offset, SEEK_SET); + + fputc(new, out); + fclose(in); + fclose(out); + return 0; +} diff --git a/duck/crack.c b/duck/crack.c new file mode 100644 index 0000000..ed4763a --- /dev/null +++ b/duck/crack.c @@ -0,0 +1,27 @@ +#include +#include +#include +#include +#define SIZE (1024*1024) + +int main() { + FILE *in = fopen("source", "r"); + FILE *out = fopen("cracked", "wb"); + char buffer[SIZE]; + size_t bytes; + + while (0 < (bytes = fread(buffer, 1, sizeof(buffer), in))) + fwrite(buffer, 1, bytes, out); + fclose(in); + fclose(out); + + out = fopen("cracked", "r+b"); + long int offset = 0x520; + uint8_t new = 0xe0; + + fseek(out, offset, SEEK_SET); + + fputc(new, out); + fclose(out); + return 0; +} diff --git a/duck/keygen.c b/duck/keygen.c new file mode 100644 index 0000000..e9b18c2 --- /dev/null +++ b/duck/keygen.c @@ -0,0 +1,9 @@ +#include + +int main() { + int card; + const int c = 0x1d60; + scanf("%d", &card); + printf("%d\n", c - card); + return 0; +} diff --git a/duck/tablet.c b/duck/tablet.c new file mode 100644 index 0000000..d62e1a0 --- /dev/null +++ b/duck/tablet.c @@ -0,0 +1,31 @@ +#include +#include +#include +#include +#define SIZE (1024*1024) + +int main() { + FILE *in = fopen("source", "r"); + FILE *out = fopen("cracked", "wb"); + char buffer[SIZE]; + size_t bytes; + + while (0 < (bytes = fread(buffer, 1, sizeof(buffer), in))) + fwrite(buffer, 1, bytes, out); + + + /* 0xe1feff54 */ + unsigned int pattern = 0x54fffee1; + /* 0x1f2003d5 */ + unsigned int new = 0xd503201f; + char buf[4]; + fseek(out, 0x520, SEEK_SET); + while (0 < (bytes = fread(buf, 1, sizeof(buf), out))) + if (*(unsigned int *)buf == pattern) + break; + fwrite(&new, 4, 1, out); + + fclose(in); + fclose(out); + return 0; +} diff --git a/duck/vendor.c b/duck/vendor.c new file mode 100644 index 0000000..6718469 --- /dev/null +++ b/duck/vendor.c @@ -0,0 +1,16 @@ +#include + +int main() { + unsigned int nya; + scanf("%u", &nya); + const unsigned int i_ebx = *(const unsigned int *)"Genu"; + const unsigned int i_edx = *(const unsigned int *)"ineI"; + const unsigned int i_ecx = *(const unsigned int *)"ntel"; + + const unsigned int a_ebx = *(const unsigned int *)"Auth"; + const unsigned int a_edx = *(const unsigned int *)"enti"; + const unsigned int a_ecx = *(const unsigned int *)"cAMD"; + + printf("%u", nya^i_ebx^i_edx^i_ecx ^ a_ebx^a_edx^a_ecx); + +}