Class: Msf::Exploit::Remote::Pkcs12::StoredPkcs12
- Inherits:
-
Object
- Object
- Msf::Exploit::Remote::Pkcs12::StoredPkcs12
- Defined in:
- lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb
Instance Method Summary collapse
- #adcs_ca ⇒ Object
- #adcs_template ⇒ Object
-
#expired?(now = Time.now) ⇒ TrueClass, FalseClass
True if the certificate is valid within the not_before/not_after, false otherwise.
- #id ⇒ Object
-
#initialize(pkcs12) ⇒ StoredPkcs12
constructor
A new instance of StoredPkcs12.
- #openssl_pkcs12 ⇒ Object
- #private_cred ⇒ Object
- #realm ⇒ Object
- #status ⇒ Object
- #username ⇒ Object
Constructor Details
#initialize(pkcs12) ⇒ StoredPkcs12
Returns a new instance of StoredPkcs12.
4 5 6 |
# File 'lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb', line 4 def initialize(pkcs12) @pkcs12 = pkcs12 end |
Instance Method Details
#adcs_ca ⇒ Object
16 17 18 |
# File 'lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb', line 16 def adcs_ca private_cred.adcs_ca || '' end |
#adcs_template ⇒ Object
20 21 22 |
# File 'lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb', line 20 def adcs_template private_cred.adcs_template || '' end |
#expired?(now = Time.now) ⇒ TrueClass, FalseClass
Returns True if the certificate is valid within the not_before/not_after, false otherwise.
41 42 43 44 |
# File 'lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb', line 41 def expired?(now = Time.now) cert = openssl_pkcs12.certificate !now.between?(cert.not_before, cert.not_after) end |
#id ⇒ Object
8 9 10 |
# File 'lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb', line 8 def id @pkcs12.id end |
#openssl_pkcs12 ⇒ Object
12 13 14 |
# File 'lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb', line 12 def openssl_pkcs12 private_cred.openssl_pkcs12 end |
#private_cred ⇒ Object
24 25 26 |
# File 'lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb', line 24 def private_cred @pkcs12.private end |
#realm ⇒ Object
32 33 34 |
# File 'lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb', line 32 def realm @pkcs12.realm&.value || '' end |
#status ⇒ Object
36 37 38 |
# File 'lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb', line 36 def status private_cred.status || '' end |
#username ⇒ Object
28 29 30 |
# File 'lib/msf/core/exploit/remote/pkcs12/stored_pkcs12.rb', line 28 def username @pkcs12.public&.username || '' end |