lib/metasploit/aggregator.rb in metasploit-aggregator-0.1.1 vs lib/metasploit/aggregator.rb in metasploit-aggregator-0.1.2

- old
+ new

@@ -40,10 +40,15 @@ # parks a session and makes it available in the getSessions def release_session(payload) # index for impl end + # return any extended details for the payload requested + def session_details(payload) + + end + # start a listening port maintained on the service # connections are forwarded to any registered default # TODO: may want to require a type here for future proof of api def add_cable(type, host, port, certificate = nil) # index for impl @@ -114,10 +119,16 @@ @client.call(:release_session, payload) rescue MessagePack::RPC::TimeoutError => e Logger.log(e.to_s) end + def session_details(payload) + @client.call(:session_details, payload) + rescue MessagePack::RPC::TimeoutError => e + Logger.log(e.to_s) + end + def add_cable(type, host, port, certificate = nil) @client.call(:add_cable, type, host, port, certificate) rescue MessagePack::RPC::TimeoutError => e Logger.log(e.to_s) end @@ -220,10 +231,14 @@ def release_session(payload) @manager.park(payload) true # return always return success for now end + def session_details(payload) + @manager.connection_details(payload) + end + def add_cable(type, host, port, certificate = nil) unless @manager.nil? case type when Cable::HTTPS # TODO: check if already listening on that port @@ -268,13 +283,9 @@ unless @manager.nil? @manager.stop end @manager = nil true - end - - def release_session(host) - @manager.park(host) end def request(uuid) # return requests here result = nil