2679c26e88
Rex::IO::StreamServer provides consistent methods and accessors for TcpServer type consumers, but includes logic for client actions which are not relevant in a datagram context - connect and disconnect actions, as well as any notion of stateful session persistence (the clients queue) do not apply in this paradigm. Implement a Rex::IO::GramServer mixin which provides common methods for dispatching requests and sending responses. Defines the same callback structure for procs as used in the StreamServer, though utilizing dispatch_request_proc and send_response_proc with client and data parameters for efficient interception of execution flow when dealing with stateless comms. Rewire Rex::Proto::DNS server to use instance variables along the same convention as other modules, implement the GramServer mixin, and minor misc cleanup. ----- Change calling conventions in Rex::Proto::DNS::Server to match other components. Clean up the Msf::Exploit::DNS namespace with generic server interfaces. Fix the advanged options naming convention - as hdm pointed out, evasion options use the '::' separator, advanced options use "_". ----- Testing: Basic functional tests in Pry for now.