Files
metasploit-gs/lib/msf/ui/gtk2/opcode/groups.rb
T
Ramon de C Valle f124597a56 Code cleanups
git-svn-id: file:///home/svn/framework3/trunk@5773 4d416f70-5f16-0410-b530-b9f4589650da
2008-10-19 21:03:39 +00:00

57 lines
1.3 KiB
Ruby

module Msf
module Ui
module Gtk2
#
# Gtk2 Interface for Metasploit Opcodes database
#
class MsfOpcode
# Create the opcode client instance
$client = Rex::Exploitation::OpcodeDb::Client.new
#
# Opcodes groups
#
class Groups < Msf::Ui::Gtk2::SkeletonOpcode
def initialize
comment = "Opcode groups currently supported by the database :"
# call the parent
super("Groups", comment)
begin
t_run = Thread.new do
textview = Gtk::TextView.new
textbuffer = Gtk::TextBuffer.new
stuff.pack_start(textview, true, true, 0)
gs = "\n"
$client.groups.each do |g|
gs << " - " + g.name + "\n"
end
textbuffer.set_text(gs)
textview.set_buffer(textbuffer)
textview.set_editable(false)
textview.set_cursor_visible(false)
show_all
end
run
destroy
t_run.kill
rescue ::Exception => e
MsfDialog::Error.new(self, e)
end
end
end
end
end
end
end