|
3 | 3 | # Current source: https://github.com/rapid7/metasploit-framework |
4 | 4 | ## |
5 | 5 |
|
6 | | - |
7 | | - |
8 | 6 | module MetasploitModule |
9 | | - |
10 | 7 | include Msf::Sessions::CommandShellOptions |
11 | 8 |
|
12 | 9 | def initialize(info = {}) |
13 | | - super(update_info(info, |
14 | | - 'Name' => 'Command Shell', |
15 | | - 'Description' => 'Spawn a piped command shell (cmd.exe on Windows, /bin/sh everywhere else)', |
16 | | - 'Author' => ['mihi', 'egypt'], |
17 | | - 'Platform' => 'java', |
18 | | - 'Arch' => ARCH_JAVA, |
19 | | - 'PayloadCompat' => {'Convention' => 'javasocket'}, |
20 | | - 'License' => MSF_LICENSE, |
21 | | - 'Session' => Msf::Sessions::CommandShell)) |
| 10 | + super( |
| 11 | + update_info( |
| 12 | + info, |
| 13 | + 'Name' => 'Command Shell', |
| 14 | + 'Description' => 'Spawn a piped command shell (cmd.exe on Windows, /bin/sh everywhere else)', |
| 15 | + 'Author' => ['mihi', 'egypt'], |
| 16 | + 'Platform' => 'java', |
| 17 | + 'Arch' => ARCH_JAVA, |
| 18 | + 'PayloadCompat' => { 'Convention' => 'javasocket' }, |
| 19 | + 'License' => MSF_LICENSE, |
| 20 | + 'Session' => Msf::Sessions::CommandShell |
| 21 | + ) |
| 22 | + ) |
22 | 23 | end |
23 | 24 |
|
24 | 25 | def stage_class_files |
25 | 26 | # Order matters. Classes can only reference classes that have already |
26 | 27 | # been sent. The last .class must implement Stage, i.e. have a start() |
27 | 28 | # method. |
28 | 29 | [ |
29 | | - [ "javapayload", "stage", "Stage.class" ], |
30 | | - [ "javapayload", "stage", "StreamForwarder.class" ], |
31 | | - [ "javapayload", "stage", "Shell.class" ], |
| 30 | + [ 'javapayload', 'stage', 'Stage.class' ], |
| 31 | + [ 'javapayload', 'stage', 'StreamForwarder.class' ], |
| 32 | + [ 'javapayload', 'stage', 'Shell.class' ], |
32 | 33 | ] |
33 | 34 | end |
34 | 35 | end |
0 commit comments