mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
Merge branch 'development' of github.com:Parabot/Parabot into development
This commit is contained in:
@@ -92,7 +92,7 @@ public class RedirectClassAdapter extends ClassVisitor implements Opcodes {
|
||||
|
||||
@Override
|
||||
public void visitMethodInsn(int opcode, String owner, String name,
|
||||
String desc) {
|
||||
String desc, boolean itf) {
|
||||
if (Core.isSecure()) {
|
||||
if (redirects.containsKey(owner) && !name.equals("<init>")
|
||||
&& !name.equals("<clinit>")) {
|
||||
@@ -109,7 +109,7 @@ public class RedirectClassAdapter extends ClassVisitor implements Opcodes {
|
||||
class_out.println(owner);
|
||||
}
|
||||
|
||||
super.visitMethodInsn(opcode, owner, name, desc);
|
||||
super.visitMethodInsn(opcode, owner, name, desc, itf);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,6 +21,7 @@ public class ClassRedirect {
|
||||
if (validStack()) {
|
||||
return c.getDeclaredField(s);
|
||||
}
|
||||
|
||||
System.out.println(c.getName() + "." + c.getDeclaredField(s) + " Blocked.");
|
||||
throw RedirectClassAdapter.createSecurityException();
|
||||
}
|
||||
@@ -29,6 +30,7 @@ public class ClassRedirect {
|
||||
if (validStack()) {
|
||||
return c.getDeclaredMethod(name, params);
|
||||
}
|
||||
|
||||
System.out.println(c.getName() + "#" + c.getDeclaredMethod(name, params) + " Blocked.");
|
||||
throw RedirectClassAdapter.createSecurityException();
|
||||
}
|
||||
|
||||
@@ -11,9 +11,16 @@ public class RuntimeRedirect {
|
||||
}
|
||||
|
||||
public static int availableProcessors(Runtime r){
|
||||
//lol faking it, fuck ikov
|
||||
return 2;
|
||||
}
|
||||
|
||||
public static long totalMemory(Runtime runtime){
|
||||
return (long) 1024;
|
||||
}
|
||||
|
||||
public static long freeMemory(Runtime runtime){
|
||||
return (long) 1024;
|
||||
}
|
||||
|
||||
public static Process exec(Runtime r,String s){
|
||||
if (s.contains("ping")){
|
||||
|
||||
Reference in New Issue
Block a user