mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 00:38:16 +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
|
@Override
|
||||||
public void visitMethodInsn(int opcode, String owner, String name,
|
public void visitMethodInsn(int opcode, String owner, String name,
|
||||||
String desc) {
|
String desc, boolean itf) {
|
||||||
if (Core.isSecure()) {
|
if (Core.isSecure()) {
|
||||||
if (redirects.containsKey(owner) && !name.equals("<init>")
|
if (redirects.containsKey(owner) && !name.equals("<init>")
|
||||||
&& !name.equals("<clinit>")) {
|
&& !name.equals("<clinit>")) {
|
||||||
@@ -109,7 +109,7 @@ public class RedirectClassAdapter extends ClassVisitor implements Opcodes {
|
|||||||
class_out.println(owner);
|
class_out.println(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
super.visitMethodInsn(opcode, owner, name, desc);
|
super.visitMethodInsn(opcode, owner, name, desc, itf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public class ClassRedirect {
|
|||||||
if (validStack()) {
|
if (validStack()) {
|
||||||
return c.getDeclaredField(s);
|
return c.getDeclaredField(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(c.getName() + "." + c.getDeclaredField(s) + " Blocked.");
|
System.out.println(c.getName() + "." + c.getDeclaredField(s) + " Blocked.");
|
||||||
throw RedirectClassAdapter.createSecurityException();
|
throw RedirectClassAdapter.createSecurityException();
|
||||||
}
|
}
|
||||||
@@ -29,6 +30,7 @@ public class ClassRedirect {
|
|||||||
if (validStack()) {
|
if (validStack()) {
|
||||||
return c.getDeclaredMethod(name, params);
|
return c.getDeclaredMethod(name, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(c.getName() + "#" + c.getDeclaredMethod(name, params) + " Blocked.");
|
System.out.println(c.getName() + "#" + c.getDeclaredMethod(name, params) + " Blocked.");
|
||||||
throw RedirectClassAdapter.createSecurityException();
|
throw RedirectClassAdapter.createSecurityException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,17 @@ public class RuntimeRedirect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int availableProcessors(Runtime r){
|
public static int availableProcessors(Runtime r){
|
||||||
//lol faking it, fuck ikov
|
|
||||||
return 2;
|
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){
|
public static Process exec(Runtime r,String s){
|
||||||
if (s.contains("ping")){
|
if (s.contains("ping")){
|
||||||
System.out.println("Faked attempted command: " + s);
|
System.out.println("Faked attempted command: " + s);
|
||||||
|
|||||||
Reference in New Issue
Block a user