Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SandHook
Project
Project
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
Administrator
SandHook
Commits
64575661
Commit
64575661
authored
Mar 20, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add classloader for loading system class
parent
45dfd0aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
SandHook.java
hooklib/src/main/java/com/swift/sandhook/SandHook.java
+5
-1
SandHookConfig.java
hooklib/src/main/java/com/swift/sandhook/SandHookConfig.java
+1
-0
No files found.
hooklib/src/main/java/com/swift/sandhook/SandHook.java
View file @
64575661
...
...
@@ -255,7 +255,11 @@ public class SandHook {
if
(
artMethodClass
!=
null
)
return
true
;
try
{
artMethodClass
=
Class
.
forName
(
"java.lang.reflect.ArtMethod"
);
if
(
SandHookConfig
.
initClassLoader
==
null
)
{
artMethodClass
=
Class
.
forName
(
"java.lang.reflect.ArtMethod"
);
}
else
{
artMethodClass
=
Class
.
forName
(
"java.lang.reflect.ArtMethod"
,
true
,
SandHookConfig
.
initClassLoader
);
}
return
true
;
}
catch
(
ClassNotFoundException
e
)
{
return
false
;
...
...
hooklib/src/main/java/com/swift/sandhook/SandHookConfig.java
View file @
64575661
...
...
@@ -10,6 +10,7 @@ public class SandHookConfig {
public
volatile
static
int
SDK_INT
=
Build
.
VERSION
.
SDK_INT
;
public
volatile
static
boolean
DEBUG
=
BuildConfig
.
DEBUG
;
public
volatile
static
boolean
compiler
=
true
;
public
volatile
static
ClassLoader
initClassLoader
;
public
volatile
static
String
libSandHookPath
;
public
volatile
static
LibLoader
libLoader
=
new
LibLoader
()
{
...
...
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