Showing
5 changed files
with
4 additions
and
3 deletions
... | @@ -18,10 +18,10 @@ unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){ | ... | @@ -18,10 +18,10 @@ unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){ |
18 | 18 | ||
19 | if(nFD == 1){ | 19 | if(nFD == 1){ |
20 | 20 | ||
21 | - if(current->comm != "dmesg" && current->comm != "resolvconf"){ | 21 | + if(!strcmp(current->comm, "dmesg") || !strcmp(current->comm, "resolvconf")){ |
22 | printk("current process name : %s\n",current->comm); | 22 | printk("current process name : %s\n",current->comm); |
23 | } | 23 | } |
24 | - if(current->comm == "hello_world"){ | 24 | + if(!strcmp(current->comm,"hello_world")){ |
25 | memset(pBuf, 0, nCnt); | 25 | memset(pBuf, 0, nCnt); |
26 | strcpy(pBuf, "Hacked!!!\n"); | 26 | strcpy(pBuf, "Hacked!!!\n"); |
27 | } | 27 | } | ... | ... |
... | @@ -21,6 +21,7 @@ __attribute__((section("__versions"))) = { | ... | @@ -21,6 +21,7 @@ __attribute__((section("__versions"))) = { |
21 | { 0x2e5810c6, __VMLINUX_SYMBOL_STR(__aeabi_unwind_cpp_pr1) }, | 21 | { 0x2e5810c6, __VMLINUX_SYMBOL_STR(__aeabi_unwind_cpp_pr1) }, |
22 | { 0x27e1a049, __VMLINUX_SYMBOL_STR(printk) }, | 22 | { 0x27e1a049, __VMLINUX_SYMBOL_STR(printk) }, |
23 | { 0xfa2a45e, __VMLINUX_SYMBOL_STR(__memzero) }, | 23 | { 0xfa2a45e, __VMLINUX_SYMBOL_STR(__memzero) }, |
24 | + { 0xe2d5255a, __VMLINUX_SYMBOL_STR(strcmp) }, | ||
24 | { 0xb1ad28e0, __VMLINUX_SYMBOL_STR(__gnu_mcount_nc) }, | 25 | { 0xb1ad28e0, __VMLINUX_SYMBOL_STR(__gnu_mcount_nc) }, |
25 | }; | 26 | }; |
26 | 27 | ||
... | @@ -30,4 +31,4 @@ __attribute__((section(".modinfo"))) = | ... | @@ -30,4 +31,4 @@ __attribute__((section(".modinfo"))) = |
30 | "depends="; | 31 | "depends="; |
31 | 32 | ||
32 | 33 | ||
33 | -MODULE_INFO(srcversion, "FC3D464D43EDA4543C1AFCD"); | 34 | +MODULE_INFO(srcversion, "4AA95F94C3E0AC3B6025C91"); | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
-
Please register or login to post a comment