Land #4828, Fixes SSL support for http_login

bug/bundler_fix
sinn3r 2015-02-23 15:04:34 -06:00
commit c0f1509f83
No known key found for this signature in database
GPG Key ID: 2384DB4EF06F730B
2 changed files with 5 additions and 2 deletions

View File

@ -193,7 +193,6 @@ module Metasploit
# login with.
# @return [Result] A Result object indicating success or failure
def attempt_login(credential)
ssl = false if ssl.nil?
result_opts = {
credential: credential,
@ -314,6 +313,10 @@ module Metasploit
self.ssl = true
end
if self.ssl.nil?
self.ssl = false
end
nil
end

View File

@ -40,7 +40,7 @@ shared_examples_for 'Metasploit::Framework::LoginScanner::HTTP' do
context "without ssl, with non-default port" do
subject(:http_scanner) { described_class.new(port:0) }
it "should not set ssl" do
expect(http_scanner.ssl).to be_nil
expect(http_scanner.ssl).to be_falsey
expect(http_scanner.port).to eq(0)
end
end