duck
parent
2a7e9b411d
commit
00a1019ddc
@ -0,0 +1,26 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#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;
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#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;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
int card;
|
||||
const int c = 0x1d60;
|
||||
scanf("%d", &card);
|
||||
printf("%d\n", c - card);
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#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;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
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);
|
||||
|
||||
}
|
Reference in New Issue