rapid7/metasploit-framework — pull request #1936 by todb-r7 (2013-06-10 21:27:56+00:00)
Title: Remove pcaprub and packetfu libraries, prefer the gems instead.

Since PacketFu and pcaprub are published as gems, they may as well be treated like the other gems we need.

## Verification

- [ ] Run `find . -name packetfu` and verify the files are gone.
- [ ] Run `find . -name pcaprub` and verify the files are gone.
- [ ] Run 'bundle install' to install the PacketFu and Pcaprub gems.
- [ ] Verify no failures when running rspec spec/lib/msf/core/exploit/capture_spec.rb
- [ ] Start msfconsole as root with `rvmsudo msfconsole -L`
- [ ] In msfconsole, `use auxiliary/gather/discovery/arp_sweep'
- [ ] In msfconsole, set the options for `INTERFACE`, `SHOST`, and `SMAC`, and `RHOSTS` as appropriate to your environment.
- [ ] In msfconsole, run `run` and verify that arp sweeping still functions correctly, as this module uses PacketFu and Pcaprub as part of the `Msf::Exploit::Capture` mixin.

In addition, this makes some minor syntax changes to two seemingly unrelated files:

* The `capture.rb` mixin source file. The syntax of `module Exploit::Capture` raises an exception for rspec, when the syntax `class Exploit; module Capture; end; end` is functionally equivalent.
* The `module.rb` class source file. This must check for the existence of the `framework` object; it's always present in the context of Metasploit, but not so much in the context of Rspec. Also, the `if` statement really wanted an `else`.

If the rspec tests pass, these changes should be fine.