I really have a hard time taking advice on copy protection from someone who doesn't known about ifndef.
Furthermore, PT_DENY_ATTACH won't help because any cracker worth is salt will just open the binary with an hex editor and remove the call to ptrace(). The other two tips to prevent cracking are, at best, as useless as this one.
And just in case you're wondering, those three methods are equally useless on iOS.
To avoid having to modify the binary (and thus deal with checksums and the like), you can alternatively break on ptrace where the first arg == PT_DENY_ATTACH, then have it immediately return. Easy to do in GDB.
I really have a hard time taking advice on copy protection from someone who doesn't known about ifndef.
Furthermore, PT_DENY_ATTACH won't help because any cracker worth is salt will just open the binary with an hex editor and remove the call to ptrace(). The other two tips to prevent cracking are, at best, as useless as this one.
And just in case you're wondering, those three methods are equally useless on iOS.