Created
September 3, 2015 23:09
-
-
Save jsyeo/6cb1b0f962a5d19f49b4 to your computer and use it in GitHub Desktop.
Executor
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
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