Module: Ronin::Payloads::Metadata::OS

Included in:
ASMPayload
Defined in:
lib/ronin/payloads/metadata/os.rb

Overview

Metadata mixin that allows a payload 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(payload) ⇒ 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 payload.

Parameters:



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

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

Instance Method Details

#os:unix, ...

The Operating System (OS) that the payload targets.

Returns:

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

See Also:



105
106
107
# File 'lib/ronin/payloads/metadata/os.rb', line 105

def os
  self.class.os
end

#os_versionString?

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



116
117
118
# File 'lib/ronin/payloads/metadata/os.rb', line 116

def os_version
  self.class.os_version
end