Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__sysctlbyname_hook parameters #6

Open
yfw123 opened this issue Aug 8, 2024 · 1 comment
Open

__sysctlbyname_hook parameters #6

yfw123 opened this issue Aug 8, 2024 · 1 comment

Comments

@yfw123
Copy link

yfw123 commented Aug 8, 2024

src path:
Dopamine2-roothide/BaseBin/systemhook/src
/main.c

old:
int __sysctlbyname_hook(const char *name, size_t namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen)
{
if(name && strncmp(name, "security.mac.amfi.developer_mode_status", namelen)==0) {
return 1;
}
return syscall__sysctlbyname(name,name,oldp,oldlenp,newp,newlen);
}

new :
int __sysctlbyname_hook(const char *name, size_t namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen)
{
if(name && strncmp(name, "security.mac.amfi.developer_mode_status", namelen)==0) {
return 1;
}
return syscall__sysctlbyname(name,namelen,oldp,oldlenp,newp,newlen);
}

@roothider
Copy link
Contributor

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants