rapid7/metasploit-framework — pull request #3761 by henryk (2014-09-08 16:47:44+00:00)
Title: Enhancements to HTTP handler communication

* This changeset replaces the Msf::Core::Handler::Reverse_Http::Uri_Checksum::generate_uri_checksum() method which was probabilistic and would sometimes fail, needing a fallback table, with a deterministic algorithm that wont' fail (and thus gets rid of the fallback table). It adds a new optional parameter specifying the requested checksum length (instead of a hardcoded value of 4).
* The reverse_http* stagers are updated to use a path length of 5, because the payload has space for 5 bytes, previously wasting 1 byte with the old implicit length of 4.
* The reverse_http stager gets new options HttpUnknownRequestForwardHost and HttpUnknownRequestForwardPort to specify a HTTP server to forward unrecognized requests to, allowing the handler to operate as a reverse HTTP proxy.
* This is complemented by new output of the incoming Host: and X-Forwarded-For: headers (in case the handler is itself operated behind a reverse HTTP proxy).