class Rex::Post::Meterpreter::Extensions::NetworkPug::NetworkPug
NetworkPug
implements a remote packet recieve/send on a network interface on the remote machine
Public Class Methods
new(client)
click to toggle source
Calls superclass method
Rex::Post::Meterpreter::Extension::new
# File lib/rex/post/meterpreter/extensions/networkpug/networkpug.rb, line 15 def initialize(client) super(client, 'networkpug') client.register_extension_aliases( [ { 'name' => 'networkpug', 'ext' => self }, ]) end
Public Instance Methods
networkpug_start(interface, filter)
click to toggle source
# File lib/rex/post/meterpreter/extensions/networkpug/networkpug.rb, line 27 def networkpug_start(interface, filter) request = Packet.create_request('networkpug_start') request.add_tlv(TLV_TYPE_NETWORKPUG_INTERFACE, interface) request.add_tlv(TLV_TYPE_NETWORKPUG_FILTER, filter) if(filter and filter != "") response = client.send_request(request) channel = nil channel_id = response.get_tlv_value(TLV_TYPE_CHANNEL_ID) if(channel_id) channel = Rex::Post::Meterpreter::Channels::Pools::StreamPool.new( client, channel_id, "networkpug_interface", CHANNEL_FLAG_SYNCHRONOUS ) end return response, channel end
networkpug_stop(interface)
click to toggle source
# File lib/rex/post/meterpreter/extensions/networkpug/networkpug.rb, line 48 def networkpug_stop(interface) request = Packet.create_request('networkpug_stop') request.add_tlv(TLV_TYPE_NETWORKPUG_INTERFACE, interface) response = client.send_request(request) end