Module: Ronin::Exploits::Params::Filename

Defined in:
lib/ronin/exploits/params/filename.rb

Overview

Adds the required filename param to the exploit.

Examples

include Params::Filename

Setting the default port value:

include Params::Filename

default_filename 'exploit.docx'

Since:

  • 1.0.0

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 the required filename param to the exploit class including Ronin::Exploits::Params::Filename.

Parameters:

Since:

  • 1.0.0



54
55
56
57
58
59
# File 'lib/ronin/exploits/params/filename.rb', line 54

def self.included(exploit)
  exploit.include Metadata::DefaultFilename
  exploit.param :filename, String, required: true,
                                   default:  -> { exploit.default_filename },
                                   desc:     'The filename for the exploit'
end

Instance Method Details

#filenameString

The filename param.

Returns:

  • (String)

Since:

  • 1.0.0



66
67
68
# File 'lib/ronin/exploits/params/filename.rb', line 66

def filename
  params[:filename]
end