Module: Ronin::Exploits::Metadata::OS

Included in:
Ronin::Exploits::MemoryCorruption
Defined in:
lib/ronin/exploits/metadata/os.rb

Overview

Metadata mixin that allows a exploit to define which Operating System (OS) it specifically targets.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(exploit) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Adds an os and os_version metadata attributes to the exploit.

Parameters:



39
40
41
# File 'lib/ronin/exploits/metadata/os.rb', line 39

def self.included(exploit)
  exploit.extend ClassMethods
end

Instance Method Details

#os:unix, ...

The Operating System (OS) that the exploit targets.

Returns:

  • (:unix, :bsd, :freebsd, :openbsd, :netbsd, :linux, :macos, :windows, :android, nil)

See Also:



104
105
106
# File 'lib/ronin/exploits/metadata/os.rb', line 104

def os
  self.class.os
end

#os_versionString?

The Operating System (OS) version that the exploit targets.



115
116
117
# File 'lib/ronin/exploits/metadata/os.rb', line 115

def os_version
  self.class.os_version
end