/* do the md5 checksum thing */ /* maybe elfcrypt ? */ #include #include #include #include #include #include #include #ifdef MACOS // ?? int ptdenyhave = 1; #endif void hello(void) { printf("Hello world!\n"); } int main(int argc, char *argv[]) { #ifdef MACOS if(ptdenyhave == 1) ptrace(PT_DENY_ATTACH, 0, 0, 0); #endif /* this is easily circumventible, so strip symbols */ if(ptrace(PTRACE_TRACEME, 0, 1, 0) < 0) { printf("ptrace called\n"); return 1; } /* not directly related to ptrace, works on breakpoints though. do i still get points? */ if((*(volatile unsigned *)((unsigned)hello + 6) & 0xFF) == 0xCC) { printf("trap called\n"); return 1; } hello(); return 0; }