File tree Expand file tree Collapse file tree 1 file changed +19
-9
lines changed
lib/metasploit/framework/login_scanner Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -193,22 +193,32 @@ def check_setup
193
193
# @raise [Rex::ConnectionError] Something has gone wrong while sending the HTTP request
194
194
# @return [Rex::Proto::Http::Response] The HTTP response
195
195
def send_request ( opts )
196
+ rhost = opts [ 'host' ] || host
197
+ rport = opts [ 'rport' ] || port
198
+ cli_ssl = opts [ 'ssl' ] || ssl
199
+ cli_ssl_version = opts [ 'ssl_version' ] || ssl_version
200
+ cli_proxies = opts [ 'proxies' ] || proxies
201
+ username = opts [ 'username' ] || ''
202
+ password = opts [ 'password' ] || ''
203
+ context = opts [ 'context' ] || { 'Msf' => framework , 'MsfExploit' => framework_module }
204
+
196
205
res = nil
197
- cli = Rex ::Proto ::Http ::Client . new ( host , port ,
198
- {
199
- 'Msf' => framework ,
200
- 'MsfExploit' => framework_module
201
- } ,
202
- ssl ,
203
- ssl_version ,
204
- proxies
206
+ cli = Rex ::Proto ::Http ::Client . new (
207
+ rhost ,
208
+ rport ,
209
+ context ,
210
+ cli_ssl ,
211
+ cli_ssl_version ,
212
+ cli_proxies ,
213
+ username ,
214
+ password
205
215
)
206
216
configure_http_client ( cli )
207
217
begin
208
218
cli . connect
209
219
req = cli . request_cgi ( opts )
210
220
res = cli . send_recv ( req )
211
- rescue ::EOFError , Errno ::ETIMEDOUT , Rex ::ConnectionError , ::Timeout ::Error => e
221
+ rescue ::EOFError , Errno ::ETIMEDOUT , Rex ::ConnectionError , ::Timeout ::Error => e ]
212
222
raise Rex ::ConnectionError , e . message
213
223
ensure
214
224
cli . close
You can’t perform that action at this time.
0 commit comments