Land #4828, Fixes SSL support for http_login
commit
c0f1509f83
|
@ -193,7 +193,6 @@ module Metasploit
|
||||||
# login with.
|
# login with.
|
||||||
# @return [Result] A Result object indicating success or failure
|
# @return [Result] A Result object indicating success or failure
|
||||||
def attempt_login(credential)
|
def attempt_login(credential)
|
||||||
ssl = false if ssl.nil?
|
|
||||||
|
|
||||||
result_opts = {
|
result_opts = {
|
||||||
credential: credential,
|
credential: credential,
|
||||||
|
@ -314,6 +313,10 @@ module Metasploit
|
||||||
self.ssl = true
|
self.ssl = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.ssl.nil?
|
||||||
|
self.ssl = false
|
||||||
|
end
|
||||||
|
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ shared_examples_for 'Metasploit::Framework::LoginScanner::HTTP' do
|
||||||
context "without ssl, with non-default port" do
|
context "without ssl, with non-default port" do
|
||||||
subject(:http_scanner) { described_class.new(port:0) }
|
subject(:http_scanner) { described_class.new(port:0) }
|
||||||
it "should not set ssl" do
|
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)
|
expect(http_scanner.port).to eq(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue