Skip to content

Instantly share code, notes, and snippets.

@miticollo
Created August 18, 2023 20:09
Show Gist options
  • Save miticollo/6d813c3c64b3607054b5c36dc0462bdd to your computer and use it in GitHub Desktop.
Save miticollo/6d813c3c64b3607054b5c36dc0462bdd to your computer and use it in GitHub Desktop.
const SYSTEMCONFIGURATION_PATH = '/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration';
const CAPTIVENETWORK_PATH = '/System/Library/PrivateFrameworks/CaptiveNetwork.framework/CaptiveNetwork';
const FOUNDATION_PATH = '/System/Library/Frameworks/Foundation.framework/Foundation';
Interceptor.attach(Module.getExportByName(SYSTEMCONFIGURATION_PATH, "CNCopyCurrentNetworkInfo"), {
onEnter(args) {
console.log("onEnter CNCopyCurrentNetworkInfo");
},
onLeave(retval) {
console.log("onLeave CNCopyCurrentNetworkInfo");
}
});
Interceptor.attach(Module.getExportByName(CAPTIVENETWORK_PATH, "CNCopyCurrentNetworkInfo"), {
onEnter(args) {
console.log("onEnter __CNCopyCurrentNetworkInfo");
},
onLeave(retval) {
console.log("onLeave __CNCopyCurrentNetworkInfo");
}
});
Interceptor.attach(Module.getExportByName(SYSTEMCONFIGURATION_PATH, "SCNetworkReachabilityGetFlags"), {
onEnter(args) {
console.log("onEnter SCNetworkReachabilityGetFlags");
},
onLeave(retval) {
console.log("onLeave SCNetworkReachabilityGetFlags");
}
});
Interceptor.attach(Module.getExportByName(FOUNDATION_PATH, "CFAbsoluteTimeGetCurrent"), {
onEnter(args) {
console.log("onEnter SCNetworkReachabilityGetFlags");
},
onLeave(retval) {
console.log("onLeave SCNetworkReachabilityGetFlags");
}
});
Interceptor.attach(Module.getExportByName(null, "time"), {
onEnter(args) {
console.log("onEnter time");
},
onLeave(retval) {
console.log("onLeave time");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment