Advertisement
DarkoreXOR

obfuscator test

Mar 23rd, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1. package com.abc.test;
  2.  
  3. import java.lang.reflect.InvocationTargetException;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.         X x = new X();
  9.  
  10.         try {
  11.             x.z("Hello, world");
  12.         }
  13.         catch(Exception e) {
  14.             System.err.println(e);
  15.         }
  16.     }
  17. }
  18.  
  19. class X {
  20.  
  21.     public void z(String text) throws IllegalAccessException, InstantiationException, ClassNotFoundException, InvocationTargetException, NoSuchMethodException {
  22.  
  23.         String a = "c.te";
  24.         String b = "st.X";
  25.         String c = "om.ab";
  26.  
  27.         Class clazz = Class.forName('c' + c + a + b);
  28.         Object obj = clazz.newInstance();
  29.  
  30.         java.lang.reflect.Method method;
  31.  
  32.         method = obj.getClass().getMethod("y", text.getClass());
  33.  
  34.         method.invoke(obj, text);
  35.     }
  36.  
  37.     public void y(String text) {
  38.         System.out.println(text);
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement