Created
September 9, 2015 00:17
-
-
Save jsyeo/69c44c8a7e77c63dee7c to your computer and use it in GitHub Desktop.
Class dot forName
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) throws ClassNotFoundException { | |
// write your code here | |
Class a = Class.forName("A"); | |
Class b = Class.forName("java.util.concurrent.Future"); | |
} | |
static void vulnerableMethod() { | |
System.out.println("pwned"); | |
} | |
} | |
class A { | |
static { | |
Main.vulnerableMethod(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment