Class: SslscanWrapper::Scanner
- Inherits:
-
Object
- Object
- SslscanWrapper::Scanner
- Defined in:
- lib/sslscan_wrapper/scanner.rb
Constant Summary collapse
- @@SSL_SCAN_FLAGS =
[ :ipv4, :ipv6, :ssl2, :ssl3, :tls10, :tls11, :tls12, :tlsall, :ocsp, :xmpp_server, :http, :bugs ]
- @@SSL_SCAN_OPTIONS =
[ :sleep, :timeout, :sni_name, :pk, :pkpass ]
- @@SSL_SCAN_ARGS =
[ '--xml=-', '--no-colour' ]
Instance Attribute Summary collapse
-
#bugs ⇒ Object
Enable SSL implementation bug work-arounds.
-
#command ⇒ Object
sslscan executable.
-
#http ⇒ Object
Test a HTTP connection.
-
#ipv4 ⇒ Object
Only use IPv4.
-
#ipv6 ⇒ Object
Only use IPv6.
-
#ocsp ⇒ Object
Request OCSP response from server.
-
#pk ⇒ Object
A file containing the private key or a PKCS12 file containing a private key/certificate pair.
-
#pkpass ⇒ Object
The password for the private key or PKCS12 file certs=<file> A file containing PEM/ASN1 formatted client certificates.
-
#rdp ⇒ Object
Send RDP preamble before starting scan.
-
#sleep ⇒ Object
Pause between connection request.
-
#sni_name ⇒ Object
Hostname for SNI.
-
#ssl2 ⇒ Object
Only check SSLv2 ciphers.
-
#ssl3 ⇒ Object
Only check SSLv3 ciphers.
-
#timeout ⇒ Object
Set socket timeout.
-
#tls10 ⇒ Object
Only check TLSv1.0 ciphers.
-
#tls11 ⇒ Object
Only check TLSv1.1 ciphers.
-
#tls12 ⇒ Object
Only check TLSv1.2 ciphers.
-
#tlsall ⇒ Object
Only check TLS ciphers (all versions).
-
#xmpp_server ⇒ Object
Use a server-to-server XMPP handshake.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Scanner
constructor
Initialize a new SslscanWrapper::Scanner object.
-
#scan(host, port) ⇒ Object
Scan a target.
Constructor Details
#initialize {|_self| ... } ⇒ Scanner
Initialize a new SslscanWrapper::Scanner object
Examples
scan = SslscanWrapper::Scanner.new do |s|
s.ipv4 = true
end
Returns a SslscanWrapper::Scanner object
59 60 61 62 63 |
# File 'lib/sslscan_wrapper/scanner.rb', line 59 def initialize @command = 'sslscan' @port = 443 yield self if block_given? end |
Instance Attribute Details
#bugs ⇒ Object
Enable SSL implementation bug work-arounds
40 41 42 |
# File 'lib/sslscan_wrapper/scanner.rb', line 40 def bugs @bugs end |
#command ⇒ Object
sslscan executable
7 8 9 |
# File 'lib/sslscan_wrapper/scanner.rb', line 7 def command @command end |
#http ⇒ Object
Test a HTTP connection
36 37 38 |
# File 'lib/sslscan_wrapper/scanner.rb', line 36 def http @http end |
#ipv4 ⇒ Object
Only use IPv4
12 13 14 |
# File 'lib/sslscan_wrapper/scanner.rb', line 12 def ipv4 @ipv4 end |
#ipv6 ⇒ Object
Only use IPv6
14 15 16 |
# File 'lib/sslscan_wrapper/scanner.rb', line 14 def ipv6 @ipv6 end |
#ocsp ⇒ Object
Request OCSP response from server
28 29 30 |
# File 'lib/sslscan_wrapper/scanner.rb', line 28 def ocsp @ocsp end |
#pk ⇒ Object
A file containing the private key or a PKCS12 file containing a private key/certificate pair
30 31 32 |
# File 'lib/sslscan_wrapper/scanner.rb', line 30 def pk @pk end |
#pkpass ⇒ Object
The password for the private key or PKCS12 file certs=<file> A file containing PEM/ASN1 formatted client certificates
32 33 34 |
# File 'lib/sslscan_wrapper/scanner.rb', line 32 def pkpass @pkpass end |
#rdp ⇒ Object
Send RDP preamble before starting scan
38 39 40 |
# File 'lib/sslscan_wrapper/scanner.rb', line 38 def rdp @rdp end |
#sleep ⇒ Object
Pause between connection request. Default is disabled
44 45 46 |
# File 'lib/sslscan_wrapper/scanner.rb', line 44 def sleep @sleep end |
#sni_name ⇒ Object
Hostname for SNI
10 11 12 |
# File 'lib/sslscan_wrapper/scanner.rb', line 10 def sni_name @sni_name end |
#ssl2 ⇒ Object
Only check SSLv2 ciphers
16 17 18 |
# File 'lib/sslscan_wrapper/scanner.rb', line 16 def ssl2 @ssl2 end |
#ssl3 ⇒ Object
Only check SSLv3 ciphers
18 19 20 |
# File 'lib/sslscan_wrapper/scanner.rb', line 18 def ssl3 @ssl3 end |
#timeout ⇒ Object
Set socket timeout. Default is 3s
42 43 44 |
# File 'lib/sslscan_wrapper/scanner.rb', line 42 def timeout @timeout end |
#tls10 ⇒ Object
Only check TLSv1.0 ciphers
20 21 22 |
# File 'lib/sslscan_wrapper/scanner.rb', line 20 def tls10 @tls10 end |
#tls11 ⇒ Object
Only check TLSv1.1 ciphers
22 23 24 |
# File 'lib/sslscan_wrapper/scanner.rb', line 22 def tls11 @tls11 end |
#tls12 ⇒ Object
Only check TLSv1.2 ciphers
24 25 26 |
# File 'lib/sslscan_wrapper/scanner.rb', line 24 def tls12 @tls12 end |
#tlsall ⇒ Object
Only check TLS ciphers (all versions)
26 27 28 |
# File 'lib/sslscan_wrapper/scanner.rb', line 26 def tlsall @tlsall end |
#xmpp_server ⇒ Object
Use a server-to-server XMPP handshake
34 35 36 |
# File 'lib/sslscan_wrapper/scanner.rb', line 34 def xmpp_server @xmpp_server end |
Instance Method Details
#scan(host, port) ⇒ Object
Scan a target
Returns a SslscanWrapper::Report object
68 69 70 |
# File 'lib/sslscan_wrapper/scanner.rb', line 68 def scan(host, port) execute(host, port) end |