rapid7/metasploit-framework — pull request #2603 by OJ (2013-11-04 07:41:16+00:00)
Title: Refactor lanattacks ruby code, add command dispatcher

The lanattacks module didn't seem to have a command dispatcher, and
hence loading the module would always result in a failure. This
commit fixes this problem.

The commit contains a bit of a refactor of the lanattacks code to be
a little more modular. It also has a shiny new dispatcher which breaks
the DHCP and TFTP functionality up into separate areas.

Loading the module in x64 and x86 succeeds. Here's a sample:

```
meterpreter > use lanattacks
Loading extension lanattacks...success.
meterpreter > help

... snip ...

Lanattacks: DHCP Commands
=========================

Command Description
------- -----------
dhcp_load_options Load DHCP optionis from a datastore
dhcp_log Log DHCP server activity
dhcp_reset Reset the DHCP server
dhcp_set_option Set a DHCP server option
dhcp_start Start the DHCP server
dhcp_stop Stop the DHCP server

Lanattacks: TFTP Commands
=========================

Command Description
------- -----------
tftp_add_file Add a file to the TFTP server
tftp_reset Reset the TFTP server
tftp_start Start the TFTP server
tftp_stop Stop the TFTP server

... snip ...
```