Add likely service ports and names for HTTP

bug/bundler_fix
James Lee 2014-07-02 23:41:31 -05:00
parent 9dde47a0bc
commit b7a55d402d
No known key found for this signature in database
GPG Key ID: 2D6094C7CEA0A321
2 changed files with 19 additions and 0 deletions

View File

@ -12,6 +12,9 @@ module Metasploit
include Metasploit::Framework::LoginScanner::Base include Metasploit::Framework::LoginScanner::Base
include Metasploit::Framework::LoginScanner::RexSocket include Metasploit::Framework::LoginScanner::RexSocket
LIKELY_PORTS = [ 80, 443, 8000, 8080 ]
LIKELY_SERVICE_NAMES = [ 'http', 'https' ]
DEFAULT_PORT = 80 DEFAULT_PORT = 80
DEFAULT_SSL_PORT = 443 DEFAULT_SSL_PORT = 443

View File

@ -30,4 +30,20 @@ describe Metasploit::Framework::LoginScanner do
end end
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 end