Method: Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Sniffer#cmd_sniffer_stop

Defined in:
lib/rex/post/meterpreter/ui/console/command_dispatcher/sniffer.rb

#cmd_sniffer_stop(*args) ⇒ Object

[View source] [View on GitHub]

95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/sniffer.rb', line 95

def cmd_sniffer_stop(*args)
  intf = args[0].to_i
  if (intf == 0)
    print_error("Usage: sniffer_stop [interface-id]")
    return
  end

  res = client.sniffer.capture_stop(intf)
  print_status("Capture stopped on interface #{intf}")
  print_status("There are #{res[:packets]} packets (#{res[:bytes]} bytes) remaining")
  print_status("Download or release them using 'sniffer_dump' or 'sniffer_release'")
  return true
end