Skip to content

Instantly share code, notes, and snippets.

@jsyeo
Created September 9, 2015 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsyeo/69c44c8a7e77c63dee7c to your computer and use it in GitHub Desktop.
Save jsyeo/69c44c8a7e77c63dee7c to your computer and use it in GitHub Desktop.
Class dot forName
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