Module: Ronin::Exploits::Metadata::OS::ClassMethods
- Defined in:
- lib/ronin/exploits/metadata/os.rb
Overview
Class-methods.
Instance Method Summary collapse
-
#os(new_os = nil) ⇒ :unix, ...
Gets or sets the exploit's targeted Operating System (OS).
-
#os_version(new_os_version = nil) ⇒ String?
Gets or sets the exploit's targeted Operating System (OS) version.
Instance Method Details
#os(new_os = nil) ⇒ :unix, ...
Gets or sets the exploit's targeted Operating System (OS).
61 62 63 64 65 66 67 68 69 |
# File 'lib/ronin/exploits/metadata/os.rb', line 61 def os(new_os=nil) if new_os @os = new_os else @os ||= if superclass.kind_of?(ClassMethods) superclass.os end end end |
#os_version(new_os_version = nil) ⇒ String?
Gets or sets the exploit's targeted Operating System (OS) version.
86 87 88 89 90 91 92 93 94 |
# File 'lib/ronin/exploits/metadata/os.rb', line 86 def os_version(new_os_version=nil) if new_os_version @os_version = new_os_version else @os_version ||= if superclass.kind_of?(ClassMethods) superclass.os_version end end end |