Skip to content

Instantly share code, notes, and snippets.

@jsyeo
Created September 3, 2015 23:09
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/6cb1b0f962a5d19f49b4 to your computer and use it in GitHub Desktop.
Save jsyeo/6cb1b0f962a5d19f49b4 to your computer and use it in GitHub Desktop.
Executor
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class Main {
static class MyRunnable implements Runnable {
public void run() {
vulnerableMethod();
}
}
public static void main(String[] args) {
ThreadPoolExecutor executor = new ThreadPoolExecutor(10 , 20, 5000, TimeUnit.MILLISECONDS, new LinkedBlockingDeque<Runnable>());
executor.execute(new MyRunnable());
}
static void vulnerableMethod() {
System.out.println("Pwnage hax0r 1337 c0d3");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment