(String classname)
| 89 | } |
| 90 | |
| 91 | public <classname> Object object_init (String classname) throws Exception { |
| 92 | |
| 93 | Class<?> target_classname = Class.forName(classname); //返回传入类对应的实例对象 |
| 94 | Field f = Unsafe.class.getDeclaredField("theUnsafe"); |
| 95 | f.setAccessible(true); |
| 96 | Unsafe unsafe = (Unsafe) f.get(null); |
| 97 | |
| 98 | classname PropertyObject = (classname) unsafe.allocateInstance(target_classname); |
| 99 | return PropertyObject; |
| 100 | } |
| 101 | |
| 102 | public Object isGadgetChain() { |
| 103 | ObjectMapper mapper = new ObjectMapper(); |