From 98a3ae930b291cf82ed4f4f095b968e76f7767f1 Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Sun, 11 Oct 2015 10:42:55 +0000 Subject: [PATCH] Add NetworkHost :lastseen to console --- extensions/console/lib/command_dispatcher/target.rb | 5 +++-- extensions/console/lib/shellinterface.rb | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/extensions/console/lib/command_dispatcher/target.rb b/extensions/console/lib/command_dispatcher/target.rb index a22c6e2f8..2929bec40 100644 --- a/extensions/console/lib/command_dispatcher/target.rb +++ b/extensions/console/lib/command_dispatcher/target.rb @@ -171,11 +171,12 @@ class Target 'Hostname', 'Type', 'Operating System', - 'MAC Address' + 'MAC Address', + 'Last Seen' ]) driver.interface.select_network_hosts['results'].each do |x| - tbl << [x['ip'],x['hostname'],x['type'],x['os'],x['mac']] + tbl << [x['ip'],x['hostname'],x['type'],x['os'],x['mac'],x['lastseen']] end puts "\nNetwork Hosts:\n\n" diff --git a/extensions/console/lib/shellinterface.rb b/extensions/console/lib/shellinterface.rb index 1e201f157..ab05f474c 100644 --- a/extensions/console/lib/shellinterface.rb +++ b/extensions/console/lib/shellinterface.rb @@ -390,7 +390,8 @@ class ShellInterface 'hostname' => x['hostname'].to_s, 'type' => x['type'].to_s, 'os' => x['os'].to_s, - 'mac' => x['mac'].to_s + 'mac' => x['mac'].to_s, + 'lastseen' => x['lastseen'].to_s }) end end