this was taken from msf/ui/console/command_dispatcher/exploit.rb.  If that's not a quality source for this kind of thing, well then maybe we should walk the walk before we talk the talk