Module Msf::Payload::Generic
In: lib/msf/core/payload/generic.rb

The generic payloads are used to define a generalized payload type that is both architecture and platform independent. Under the hood, generic payloads seek out the correct payload for the appropriate architecture and platform that is being targeted.

Methods

Attributes

actual_payload  [RW]  The actual underlying platform/arch-specific payload instance that should be used.
explicit_arch  [RW]  Accessor that makes it possible to define an explicit architecture. This is used for things like payload regeneration.
explicit_platform  [RW]  Accessor that makes it possible to define an explicit platform. This is used for things like payload regeneration.

Public Class methods

Registers options that are common to all generic payloads, such as platform and arch.

Public Instance methods

Generate is different from other methods — it will try to re-detect the actual payload in case settings have changed. Other methods will use the cached version if possible.

Overrides — we have to redirect all potential payload methods to the actual payload so that they get handled appropriately, cuz we‘re like a proxy and stuff. We can‘t use method_undefined because all of these methods are actually defined.

First, find the underlying payload and then pass all methods onto it.

Reset‘s the generic payload‘s internal state so that it can find a new actual payload.

Protected Instance methods

Returns the actual architecture that should be used for the payload.

Returns the actual platform that should be used for the payload.

[Validate]