Module: Ronin::Exploits::Mixins::HasPayload::ClassMethods
- Defined in:
- lib/ronin/exploits/mixins/has_payload.rb
Overview
Class methods.
Instance Method Summary collapse
-
#payload_class(new_payload_class = nil) ⇒ Class<Ronin::Payloads::Payload>
Gets or sets the payload base class that is compatible with the exploit.
Instance Method Details
#payload_class(new_payload_class = nil) ⇒ Class<Ronin::Payloads::Payload>
Gets or sets the payload base class that is compatible with the exploit.
74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/ronin/exploits/mixins/has_payload.rb', line 74 def payload_class(new_payload_class=nil) if new_payload_class @payload_class = new_payload_class else @payload_class ||= if superclass.kind_of?(ClassMethods) superclass.payload_class else Ronin::Payloads::Payload end end end |