Skip to content

Commit c0f1509

Browse files
committed
Land rapid7#4828, Fixes SSL support for http_login
2 parents c39d6e1 + 8b0354b commit c0f1509

File tree

2 files changed

+5
-2
lines changed
  • lib/metasploit/framework/login_scanner
  • spec/support/shared/examples/metasploit/framework/login_scanner

2 files changed

+5
-2
lines changed

lib/metasploit/framework/login_scanner/http.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ def check_setup
193193
# login with.
194194
# @return [Result] A Result object indicating success or failure
195195
def attempt_login(credential)
196-
ssl = false if ssl.nil?
197196

198197
result_opts = {
199198
credential: credential,
@@ -314,6 +313,10 @@ def set_sane_defaults
314313
self.ssl = true
315314
end
316315

316+
if self.ssl.nil?
317+
self.ssl = false
318+
end
319+
317320
nil
318321
end
319322

spec/support/shared/examples/metasploit/framework/login_scanner/http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
context "without ssl, with non-default port" do
4141
subject(:http_scanner) { described_class.new(port:0) }
4242
it "should not set ssl" do
43-
expect(http_scanner.ssl).to be_nil
43+
expect(http_scanner.ssl).to be_falsey
4444
expect(http_scanner.port).to eq(0)
4545
end
4646
end

0 commit comments

Comments
 (0)