Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ReyunSecureSdk
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanglei
ReyunSecureSdk
Commits
f34d6966
Commit
f34d6966
authored
Apr 19, 2021
by
Fear1ess
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4/19
parent
39118ec8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
collect.c
wandun/src/main/cpp/collect.c
+0
-0
core.c
wandun/src/main/cpp/core.c
+14
-5
No files found.
wandun/src/main/cpp/collect.c
View file @
f34d6966
This diff is collapsed.
Click to expand it.
wandun/src/main/cpp/core.c
View file @
f34d6966
...
...
@@ -34,6 +34,7 @@ JNIEXPORT void jni_init(JNIEnv* env, jobject thiz, jobject context) {
}
JNIEXPORT
jint
JNI_OnLoad
(
JavaVM
*
vm
,
void
*
reserved
)
{
logd
(
"wdun_core"
,
"%s"
,
"enter jni_onload..."
);
JNIEnv
*
env
=
NULL
;
if
((
*
vm
)
->
GetEnv
(
vm
,
(
void
**
)
&
env
,
JNI_VERSION_1_6
)
==
JNI_OK
)
{
jclass
cls
=
(
*
env
)
->
FindClass
(
env
,
WDMAIN_CLASS_NAME
);
...
...
@@ -43,12 +44,20 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
(
*
env
)
->
DeleteLocalRef
(
env
,
cls
);
}
//find lic needed symbol
logd
(
"wdun_core"
,
"%s"
,
"find libc symbol..."
);
//find libc needed symbol
struct
so_info
*
si
=
fake_dlopen
(
"libc.so"
,
0
);
g_funcs
.
wd_popen
=
fake_dlsym
(
si
,
"popen"
);
g_funcs
.
wd_pclose
=
fake_dlsym
(
si
,
"pclose"
);
g_funcs
.
wd_system_property_get
=
fake_dlsym
(
si
,
"__system_property_get"
);
fake_dlclose
(
si
);
if
(
si
!=
NULL
)
{
g_funcs
.
wd_popen
=
fake_dlsym
(
si
,
"popen"
);
g_funcs
.
wd_pclose
=
fake_dlsym
(
si
,
"pclose"
);
g_funcs
.
wd_system_property_get
=
fake_dlsym
(
si
,
"__system_property_get"
);
fake_dlclose
(
si
);
}
if
(
!
g_funcs
.
wd_popen
)
g_funcs
.
wd_popen
=
popen
;
if
(
!
g_funcs
.
wd_pclose
)
g_funcs
.
wd_pclose
=
pclose
;
if
(
!
g_funcs
.
wd_system_property_get
)
g_funcs
.
wd_system_property_get
=
__system_property_get
;
logd
(
"wdun_core"
,
"%s"
,
"leave jni_onload..."
);
return
JNI_VERSION_1_6
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment