FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
linuxKernelRoot/testRoot/init64_helper.h at master · CKAndroidProject/linuxKernelRoot · GitHub
CKAndroidProject
/
linuxKernelRoot
Public
forked from
abcz316/SKRoot-linuxKernelRoot
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
linuxKernelRoot
/
testRoot
/
init64_helper.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (31 loc) · 1.17 KB
Breadcrumbs
linuxKernelRoot
/
testRoot
/
init64_helper.h
Copy path
File metadata and controls
34 lines (31 loc) · 1.17 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef
INIT64_HELPER_H_
#define
INIT64_HELPER_H_
#include
<unistd.h>
#include
"process64_inject.h"
//注入init64进程远程执行命令,备注:此命令会自动提权到ROOT、并且关闭SELinux。结束运行后可根据自己的需要决定是否手动重新打开SELinux
static
ssize_t
inject_init64_run_cmd_wrapper
(
const
char
*
str_root_key
,
const
char
*
cmd
,
const
char
*
p_out_result_buf
=
NULL
,
size_t
out_result_buf_size
=
0
,
bool
=
true) {
pid_t
target_pid
=
1
;
return
inject_process64_run_cmd_wrapper
(
str_root_key
,
target_pid
,
cmd
,
p_out_result_buf
,
out_result_buf_size
,
false, false, false,
NULL
, false,
NULL
);
}
//fork安全版本(可用于安卓APP直接调用)
static
ssize_t
safe_inject_init64_run_cmd_wrapper
(
const
char
*
str_root_key
,
const
char
*
cmd
,
const
char
*
p_out_result_buf
=
NULL
,
size_t
out_result_buf_size
=
0
,
bool
=
true) {
pid_t
target_pid
=
1
;
return
safe_inject_process64_run_cmd_wrapper
(
str_root_key
,
target_pid
,
cmd
,
p_out_result_buf
,
out_result_buf_size
,
false, false, false,
NULL
, false,
NULL
);
}
#endif
/* INIT64_HELPER_H_ */
Back
|
FazBrowse Home
|
New Git URL