metasploit-framework/lib/msf
Brent Cook 725a17c70b override default attr for OptRegexp
Rather than literally returning the default Regex object, override the accessor
to return the string representation. This allows the RPC backend to properly
serialize the options hash values, since msgpack does not know how to serialize
a Regexp object. Fixes #3798.

To verify the fix, run the steps for issue #3798 and ensure that the module
options are returned instead of a backtrace. Also, ensure that the module
continues to work as expected:

```
$ ./msfconsole -q
msf > use auxiliary/scanner/http/scraper
msf auxiliary(scraper) > info

       Name: HTTP Page Scraper
     Module: auxiliary/scanner/http/scraper
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  et <et@metasploit.com>

Basic options:
  Name     Current Setting               Required  Description
  ----     ---------------               --------  -----------
  PATH     /                             yes       The test path to the page to analize
  PATTERN  (?i-mx:<title>(.*)<\/title>)  yes       The regex to use (default regex is a sample to grab page title)
  Proxies                                no        Use a proxy chain
  RHOSTS                                 yes       The target address range or CIDR identifier
  RPORT    80                            yes       The target port
  THREADS  1                             yes       The number of concurrent threads
  VHOST                                  no        HTTP server virtual host

override default attr for OptRegexp
Description:
  Scrap defined data from a specific web page based on a regular
  expresion

msf auxiliary(scraper) > set RHOSTS lwn.net
RHOSTS => lwn.net
msf auxiliary(scraper) > set RHOSTS 72.51.34.34
RHOSTS => 72.51.34.34
msf auxiliary(scraper) > set VHOST lwn.net
VHOST => lwn.net
msf auxiliary(scraper) > run

[*] [72.51.34.34] / [Welcome to LWN.net [LWN.net]]
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
```
2014-12-24 09:57:14 -06:00
..
base Land #4332, test optimization for Cucumber 2014-12-18 09:34:55 -06:00
core override default attr for OptRegexp 2014-12-24 09:57:14 -06:00
http Fix feedback's review 2014-12-06 21:47:55 -06:00
scripts Refactor WindowsServices 2012-11-06 17:30:04 -06:00
ui Land #4425, jobs tab completion NilClass fix 2014-12-18 15:25:57 -06:00
util Land #4377, Support DYNAMIC_BASE templates - resolves #4366 2014-12-23 11:57:33 +00:00
LICENSE
base.rb Fix Undocumentable method, missing name YARD warning 2013-03-30 15:32:38 -05:00
core.rb Extract Msf::Target 2014-10-16 15:13:18 -05:00
events.rb Retab lib 2013-08-30 16:28:33 -05:00
sanity.rb Revert "Various merge resolutions from master <- staging" 2014-08-22 10:17:44 -05:00
ui.rb Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
util.rb Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
windows_error.rb Retab lib 2013-08-30 16:28:33 -05:00