Add likely service ports and names for HTTP
parent
9dde47a0bc
commit
b7a55d402d
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue