rapid7/metasploit-framework — pull request #2477 by jvazquez-r7 (2013-10-07 17:33:51+00:00)
Title: Fix rspec for Rex::Exploitation::RopDb

Obviously I suck at rspec and failed to correctly handle the rspec going with #2467. This pull request tries to add the feedback from @limhoff-r7 and available on the pull request.

Probably review from @limhoff-r7 and @wchen-r7 is needed here before landing it.

Verification:

- [ ] Wait for the @limhoff-r7 and wchen-r7's okey to it.
- [ ] run ```rspec spec/lib/rex/exploitation/ropdb_spec.rb```. Ensure the rspec runs ok:

```
$ rspec spec/lib/rex/exploitation/ropdb_spec.rb

Rex::Exploitation::RopDb
Class methods
.initialize
should initialize with a path of the ROP database ready
.has_rop?
should find the msvcrt ROP database
should find the java ROP database
should find the hxds ROP database
should find the flash ROP database
should return false when I supply an invalid database
.select_rop
should return msvcrt gadgets
should return msvcrt gadgets for windows server 2003
should return msvcrt gadgets with a new base
.generate_rop_payload
should generate my ROP payload
should generate my ROP payload with my stack pivot
.get_safe_size
should return 0xfffffed0 (value does not need to be modified to avoid null bytes)
should return 0xfffffeff (value is modified to avoid null bytes)
.get_unsafe_size
should return 0xfffffc00 (contains a null byte)

Finished in 0.1009 seconds
14 examples, 0 failures

```