2007-05-21 22:39:24 +00:00
|
|
|
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 locales
|
|
|
|
#
|
|
|
|
class Locales < Msf::Ui::Gtk2::SkeletonOpcode
|
|
|
|
def initialize
|
|
|
|
comment = "Locales currently supported by the database:"
|
|
|
|
|
|
|
|
# call the parent
|
|
|
|
super("Locales", comment)
|
|
|
|
|
|
|
|
self.set_default_size(500, 230)
|
2007-06-20 21:02:31 +00:00
|
|
|
|
2007-06-02 20:10:24 +00:00
|
|
|
begin
|
2007-06-20 21:02:31 +00:00
|
|
|
t_run = Thread.new do
|
|
|
|
textview = Gtk::TextView.new
|
|
|
|
textbuffer = Gtk::TextBuffer.new
|
|
|
|
stuff.pack_start(textview, true, true, 0)
|
2007-06-02 20:10:24 +00:00
|
|
|
|
2007-06-20 21:02:31 +00:00
|
|
|
locales = "\n"
|
|
|
|
$client.locales.each do |locale|
|
|
|
|
locales << " -" + locale.name + "\n"
|
|
|
|
end
|
2007-06-02 20:10:24 +00:00
|
|
|
|
2007-06-20 21:02:31 +00:00
|
|
|
textbuffer.set_text( locales )
|
2007-06-02 20:10:24 +00:00
|
|
|
|
2007-06-20 21:02:31 +00:00
|
|
|
textview.set_buffer(textbuffer)
|
|
|
|
textview.set_editable(false)
|
|
|
|
textview.set_cursor_visible(false)
|
2007-06-02 20:10:24 +00:00
|
|
|
|
2007-06-20 21:02:31 +00:00
|
|
|
show_all
|
|
|
|
end
|
|
|
|
run
|
2007-06-02 20:10:24 +00:00
|
|
|
destroy
|
2007-06-20 21:02:31 +00:00
|
|
|
t_run.kill
|
2007-06-02 20:10:24 +00:00
|
|
|
rescue ::Exception => e
|
|
|
|
MsfDialog::Error.new(self, e)
|
2007-05-21 22:39:24 +00:00
|
|
|
end
|
2007-06-20 21:02:31 +00:00
|
|
|
|
2007-05-21 22:39:24 +00:00
|
|
|
end
|
2007-06-20 21:02:31 +00:00
|
|
|
|
2007-05-21 22:39:24 +00:00
|
|
|
end
|
2007-06-02 20:10:24 +00:00
|
|
|
|
2007-05-21 22:39:24 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|