Update for graphical meterpreter (cmd_ps)
git-svn-id: file:///home/svn/framework3/trunk@4981 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
6bb46ec862
commit
1630aa7900
|
@ -50,7 +50,11 @@ module Msf
|
||||||
|
|
||||||
# Init tips on the treeview for session
|
# Init tips on the treeview for session
|
||||||
tips = SessionTips.new(column_type)
|
tips = SessionTips.new(column_type)
|
||||||
|
begin
|
||||||
tips.add_view(@treeview)
|
tips.add_view(@treeview)
|
||||||
|
rescue
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
#set model to treeview
|
#set model to treeview
|
||||||
@treeview.set_model(@model)
|
@treeview.set_model(@model)
|
||||||
|
|
|
@ -97,6 +97,12 @@ module Msf
|
||||||
# Session Gtk::Menu
|
# Session Gtk::Menu
|
||||||
menu_process = Gtk::Menu.new
|
menu_process = Gtk::Menu.new
|
||||||
|
|
||||||
|
refresh_item_shell = Gtk::ImageMenuItem.new("Refresh")
|
||||||
|
refresh_image_shell = Gtk::Image.new
|
||||||
|
refresh_image_shell.set(Gtk::Stock::REFRESH, Gtk::IconSize::MENU)
|
||||||
|
refresh_item_shell.set_image(refresh_image_shell)
|
||||||
|
menu_process.append(refresh_item_shell)
|
||||||
|
|
||||||
migrate_item_shell = Gtk::ImageMenuItem.new("Migrate PID")
|
migrate_item_shell = Gtk::ImageMenuItem.new("Migrate PID")
|
||||||
migrate_image_shell = Gtk::Image.new
|
migrate_image_shell = Gtk::Image.new
|
||||||
migrate_image_shell.set(Gtk::Stock::CONVERT, Gtk::IconSize::MENU)
|
migrate_image_shell.set(Gtk::Stock::CONVERT, Gtk::IconSize::MENU)
|
||||||
|
@ -109,6 +115,10 @@ module Msf
|
||||||
kill_item_shell.set_image(kill_image_shell)
|
kill_item_shell.set_image(kill_image_shell)
|
||||||
menu_process.append(kill_item_shell)
|
menu_process.append(kill_item_shell)
|
||||||
|
|
||||||
|
refresh_item_shell.signal_connect('activate') do |item|
|
||||||
|
update()
|
||||||
|
end
|
||||||
|
|
||||||
migrate_item_shell.signal_connect('activate') do |item|
|
migrate_item_shell.signal_connect('activate') do |item|
|
||||||
if current = @selection.selected
|
if current = @selection.selected
|
||||||
cmd_migrate(current.get_value(PID).to_i)
|
cmd_migrate(current.get_value(PID).to_i)
|
||||||
|
@ -153,7 +163,11 @@ module Msf
|
||||||
# Kills one or more processes.
|
# Kills one or more processes.
|
||||||
#
|
#
|
||||||
def cmd_kill(*args)
|
def cmd_kill(*args)
|
||||||
|
begin
|
||||||
@client.sys.process.kill(*(args.map { |x| x.to_i }))
|
@client.sys.process.kill(*(args.map { |x| x.to_i }))
|
||||||
|
rescue ::Exception => e
|
||||||
|
MsfDialog::Warning.new(self, "Kill Process", e.to_s)
|
||||||
|
end
|
||||||
update()
|
update()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue