add the open_session method and few comments
git-svn-id: file:///home/svn/framework3/trunk@4492 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
a01a28f725
commit
4058b1326c
|
@ -450,7 +450,7 @@ class MySessionTree
|
||||||
String, # IP Address
|
String, # IP Address
|
||||||
String, # Payload Type
|
String, # Payload Type
|
||||||
Object, # Session Object
|
Object, # Session Object
|
||||||
Object
|
Object # Gtk::TextBuffer
|
||||||
)
|
)
|
||||||
|
|
||||||
# Renderer
|
# Renderer
|
||||||
|
@ -537,7 +537,7 @@ class MySessionTree
|
||||||
begin
|
begin
|
||||||
iter = @treeview.model.get_iter(path)
|
iter = @treeview.model.get_iter(path)
|
||||||
treeview.selection.select_path(path)
|
treeview.selection.select_path(path)
|
||||||
Msf::Ui::Gtk2::Stream::Console.new(iter)
|
open_session(iter)
|
||||||
rescue
|
rescue
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
@ -548,7 +548,7 @@ class MySessionTree
|
||||||
# Items session signals
|
# Items session signals
|
||||||
session_item_shell.signal_connect('activate') do |item|
|
session_item_shell.signal_connect('activate') do |item|
|
||||||
if current = @selection.selected
|
if current = @selection.selected
|
||||||
Msf::Ui::Gtk2::Stream::Console.new(current)
|
open_session(current)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -562,7 +562,6 @@ class MySessionTree
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add an iter to the session treeview
|
# Add an iter to the session treeview
|
||||||
# TODO: session.via_payload return nil => BUG
|
|
||||||
#
|
#
|
||||||
def add_session(session)
|
def add_session(session)
|
||||||
iter = @model.append
|
iter = @model.append
|
||||||
|
@ -573,8 +572,16 @@ class MySessionTree
|
||||||
iter[O_BUFFER] = Gtk::TextBuffer.new
|
iter[O_BUFFER] = Gtk::TextBuffer.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# Open the session with the selected iter
|
||||||
|
#
|
||||||
|
def open_session(iter)
|
||||||
|
Msf::Ui::Gtk2::Stream::Console.new(iter)
|
||||||
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Kill the session associated with this item
|
# Kill the session associated with this item
|
||||||
|
# TODO: Bug on the sesson kill
|
||||||
#
|
#
|
||||||
def remove_session_iter(iter)
|
def remove_session_iter(iter)
|
||||||
# Just kill the session, let the event handler remove it
|
# Just kill the session, let the event handler remove it
|
||||||
|
|
Loading…
Reference in New Issue