-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace SandboxClassLoader with working SSVM SandBox
- Loading branch information
1 parent
d32c291
commit f066c6e
Showing
14 changed files
with
123 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 0 additions & 75 deletions
75
deobfuscator-api/src/main/java/uwu/narumi/deobfuscator/api/execution/SandboxClassLoader.java
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
deobfuscator-api/src/main/java/uwu/narumi/deobfuscator/api/execution/SandboxPolicy.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
...mpl/src/test/java/uwu/narumi/deobfuscator/transformer/TestSandboxSecurityTransformer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
package uwu.narumi.deobfuscator.transformer; | ||
|
||
import dev.xdark.ssvm.mirror.type.InstanceClass; | ||
import uwu.narumi.deobfuscator.api.asm.ClassWrapper; | ||
import uwu.narumi.deobfuscator.api.context.Context; | ||
import uwu.narumi.deobfuscator.api.execution.SandboxClassLoader; | ||
import uwu.narumi.deobfuscator.api.execution.SandBox; | ||
import uwu.narumi.deobfuscator.api.transformer.Transformer; | ||
|
||
import java.lang.reflect.Method; | ||
|
||
public class TestSandboxSecurityTransformer extends Transformer { | ||
@Override | ||
protected void transform(ClassWrapper scope, Context context) throws Exception { | ||
SandboxClassLoader sandboxClassLoader = new SandboxClassLoader(context); | ||
Class<?> clazz = Class.forName("TestSandboxSecurity", true, sandboxClassLoader); | ||
Method method = clazz.getDeclaredMethod("test"); | ||
// Invoke test method | ||
method.invoke(null); | ||
SandBox sandBox = context.getSandBox(); | ||
InstanceClass clazz = sandBox.getHelper().loadClass("sandbox.TestSandboxSecurity"); | ||
|
||
sandBox.getInvocationUtil().invokeInt( | ||
clazz.getMethod("test", "()I") | ||
); | ||
} | ||
} |
Oops, something went wrong.