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
6ad5dca1
Commit
6ad5dca1
authored
Jan 23, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only static method need resolve
parent
31b1326a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
SandHook.java
app/src/main/java/com/swift/sandhook/SandHook.java
+5
-2
No files found.
app/src/main/java/com/swift/sandhook/SandHook.java
View file @
6ad5dca1
...
@@ -11,6 +11,7 @@ import java.lang.reflect.Constructor;
...
@@ -11,6 +11,7 @@ import java.lang.reflect.Constructor;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Member
;
import
java.lang.reflect.Member
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Modifier
;
public
class
SandHook
{
public
class
SandHook
{
...
@@ -70,8 +71,10 @@ public class SandHook {
...
@@ -70,8 +71,10 @@ public class SandHook {
//ignore result, just call to trigger resolve
//ignore result, just call to trigger resolve
try
{
try
{
if
(
method
instanceof
Method
)
{
if
(
method
instanceof
Method
)
{
((
Method
)
method
).
setAccessible
(
true
);
if
(
Modifier
.
isStatic
(
method
.
getModifiers
()))
{
((
Method
)
method
).
invoke
(
null
);
((
Method
)
method
).
setAccessible
(
true
);
((
Method
)
method
).
invoke
(
null
);
}
}
else
if
(
method
instanceof
Constructor
){
}
else
if
(
method
instanceof
Constructor
){
((
Constructor
)
method
).
setAccessible
(
true
);
((
Constructor
)
method
).
setAccessible
(
true
);
((
Constructor
)
method
).
newInstance
(
null
);
((
Constructor
)
method
).
newInstance
(
null
);
...
...
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