(byte[] b,String name)
| 40 | |
| 41 | public static class BypassClassLoader0 extends ClassLoader{ |
| 42 | public Class get(byte[] b,String name) { |
| 43 | PermissionCollection pc = new Permissions(); |
| 44 | pc.add(new AllPermission()); |
| 45 | //设置ProtectionDomain |
| 46 | ProtectionDomain pd = new ProtectionDomain(new CodeSource(null, (Certificate[]) null), pc, this, null); |
| 47 | return super.defineClass(name, b, 0, b.length,pd); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | public static void main(String[] args) { |
no outgoing calls