Files
metasploit-gs/lib/msf/core
Brent Cook 249c08f597 usability improvements ith how base options are registered
This adds named parameters for all of the current array-index based
options. It also allows specifying the description as the 2nd parameter,
allowing the 'required' parameter to be implicitly false (the most
common value).

A simple parameter like:

 OptAddress.new('ReverseListenerBindAddress',
   [false, 'The specific IP address to bind to on the local system']),

Can now be rewritten as:

 OptAddress.new('ReverseListenerBindAddress',
   'The specific IP address to bind to on the local system'),

More complex options are also now easier to read:

 OptString.new(
   'HttpUserAgent',
   'The user-agent that the payload should use',
   default: Rex::UserAgent.shortest,
   aliases: ['MeterpreterUserAgent']
 ),

This also makes dealing with enums easier because default is implicit
unless specified. This:

  OptEnum.new('PayloadProxyType',
    [true, 'The proxy type, HTTP or SOCKS', 'HTTP', ['HTTP', 'SOCKS']]),

Becomes:

  OptEnum.new('HttpProxyType',
    'The proxy type, HTTP or SOCKS', required: true, enums: ['HTTP', 'SOCKS'])

This maintains full backward compatibility with existing code as well.
2017-11-21 02:52:05 -06:00
..
2017-10-31 04:53:14 -05:00
2017-10-31 04:53:14 -05:00
2017-10-30 14:04:10 -05:00
2017-06-24 15:50:37 -05:00
2017-11-09 03:00:24 +11:00
2017-01-04 22:20:42 -05:00
2016-04-21 00:47:07 -04:00
2017-10-13 15:33:27 -05:00
2016-04-21 13:06:00 -05:00
2017-05-04 22:51:40 -05:00
2017-05-04 12:57:50 -05:00
2016-05-23 15:48:03 -05:00
2017-08-08 19:06:51 -05:00
2017-05-04 12:57:50 -05:00
2017-01-12 19:28:06 -06:00