mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-27 07:37:19 +00:00
21 lines
539 B
C
21 lines
539 B
C
#include <stdio.h>
|
|
#include <dlfcn.h>
|
|
#include <string.h>
|
|
|
|
static int (*original_remove)(const char *pathname);
|
|
static const char *HookPath = "/media/mmc/time_lapse/.setup";
|
|
extern char TimeLapsePath[256];
|
|
|
|
static void __attribute ((constructor)) remove_hook_init(void) {
|
|
|
|
original_remove = dlsym(dlopen ("/lib/libc.so.0", RTLD_LAZY), "remove");
|
|
}
|
|
|
|
int remove(const char *pathname) {
|
|
|
|
if(!strncmp(pathname, HookPath, strlen(HookPath))) printf("[webhook] time_lapse_finish %s\n", TimeLapsePath);
|
|
return original_remove(pathname);
|
|
}
|
|
|
|
|