tips for the session view, generate by the session.type

git-svn-id: file:///home/svn/framework3/trunk@4924 4d416f70-5f16-0410-b530-b9f4589650da
unstable
fab 2007-05-17 22:17:24 +00:00
parent 207ad420a5
commit a12f4a6031
2 changed files with 66 additions and 1 deletions

View File

@ -2,11 +2,11 @@ require 'msf/core'
require 'msf/base'
require 'msf/ui'
require 'msf/ui/gtk2/treeviewtooltips'
require 'msf/ui/gtk2/controls'
require 'msf/ui/gtk2/app'
require 'msf/ui/gtk2/about'
require 'msf/ui/gtk2/frame'
require 'msf/ui/gtk2/treeviewtooltips'
require 'msf/ui/gtk2/assistant'
require 'msf/ui/gtk2/dialogs'
require 'msf/ui/gtk2/console'

View File

@ -0,0 +1,65 @@
module Msf
module Ui
module Gtk2
#
# Subclass the TreeViewTooltips to add our get_tooltip function
#
class SessionTips < Msf::Ui::Gtk2::TreeViewTooltips
def initialize(column)
super()
@column = column
end
def get_tooltip(view, column, path)
if (column == @column)
model = view.model
iter = model.get_iter(path)
@session = iter.get_value(3)
if ( @session.type == "shell")
tips = shell_tips()
elsif ( @session.type == "meterpreter")
tips = meterpreter_tips()
elsif (@session.type == "vncinject")
tips = vncinject_tips()
end
return tips
end
#
# Shell session tips
#
def shell_tips
text = ""
text << "Exploit: #{@session.via_exploit} \n"
text << "Payload: #{@session.via_payload}"
end
#
# Meterpreter session tips
#
def meterpreter_tips
text = ""
text << "Exploit: #{@session.via_exploit} \n"
text << "Payload: #{@session.via_payload} \n"
text << "PID: #{@session.sys.process.getpid}"
end
#
# VNCInject session tips
#
def vncinject_tips
shell_tips()
end
end
end
end
end
end