diff --git a/lib/metasploit/framework/login_scanner/http.rb b/lib/metasploit/framework/login_scanner/http.rb index 81d90d3aaa..7be9b341bf 100644 --- a/lib/metasploit/framework/login_scanner/http.rb +++ b/lib/metasploit/framework/login_scanner/http.rb @@ -12,6 +12,9 @@ module Metasploit include Metasploit::Framework::LoginScanner::Base include Metasploit::Framework::LoginScanner::RexSocket + LIKELY_PORTS = [ 80, 443, 8000, 8080 ] + LIKELY_SERVICE_NAMES = [ 'http', 'https' ] + DEFAULT_PORT = 80 DEFAULT_SSL_PORT = 443 diff --git a/spec/lib/metasploit/framework/login_scanner_spec.rb b/spec/lib/metasploit/framework/login_scanner_spec.rb index 7dbeaec76e..b981754c11 100644 --- a/spec/lib/metasploit/framework/login_scanner_spec.rb +++ b/spec/lib/metasploit/framework/login_scanner_spec.rb @@ -30,4 +30,20 @@ describe Metasploit::Framework::LoginScanner do end end + context "with name 'http'" do + let(:name) { 'http' } + + it { should include Metasploit::Framework::LoginScanner::HTTP } + it { should_not include Metasploit::Framework::LoginScanner::SMB } + end + + [ 80, 8080, 8000, 443 ].each do |foo| + context "with port #{foo}" do + let(:port) { foo } + + it { should include Metasploit::Framework::LoginScanner::HTTP } + it { should_not include Metasploit::Framework::LoginScanner::SMB } + end + end + end