Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Cycript Detection
// https://stackoverflow.com/questions/34131835/detect-if-cycript-substrate-or-gdb-is-attached-to-an-ios-apps-process
BOOL hasCynject() {
int max = _dyld_image_count();
for (int i = 0; i < max; i++) {
const char *name = _dyld_get_image_name(i);
if (name != NULL) {
if (strstr(name, "cynject") == 0) return YES;
}
}
}
BOOL hasLibcycript() {
int max = _dyld_image_count();
for (int i = 0; i < max; i++) {
const char *name = _dyld_get_image_name(i);
const char needle[11] = "libcycript";
if ((ret = strstr(name, needle)) != NULL) return YES;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.