add types opcode

git-svn-id: file:///home/svn/framework3/trunk@4738 4d416f70-5f16-0410-b530-b9f4589650da
unstable
fab 2007-04-22 19:14:00 +00:00
parent 6d571414b7
commit 88ed614b7e
3 changed files with 43 additions and 6 deletions

View File

@ -11,3 +11,4 @@ style "textview"
# Attach style with the specific widget name
widget_class "GtkDialog.GtkVBox.GtkVBox.GtkTextView" style "textview"
widget_class "GtkDialog.GtkVBox.GtkVBox.GtkScrolledWindow.GtkTextView" style "textview"

View File

@ -138,6 +138,7 @@ class MyApp < MyGlade
# Actions for OpCodes/Types
#
def on_types_activate
MsfOpcode::Types.new()
end
#

View File

@ -53,7 +53,7 @@ class MsfOpcode
$client = Rex::Exploitation::OpcodeDb::Client.new
#
# Statistics Opcodes
# Opcodes statistics
#
class Stats < Msf::Ui::Gtk2::SkeletonOpcode
@ -93,11 +93,11 @@ class MsfOpcode
end
#
# Locales Opcodes
# Opcodes locales
#
class Locales < Msf::Ui::Gtk2::SkeletonOpcode
def initialize
comment = "Locales currently supported :"
comment = "Locales currently supported by the database:"
# call the parent
super("Locales", comment)
@ -125,7 +125,7 @@ class MsfOpcode
end
#
# Metatypes Opcodes
# Opcodes meta types
#
class Metatypes < Msf::Ui::Gtk2::SkeletonOpcode
def initialize
@ -154,11 +154,11 @@ class MsfOpcode
end
#
# Groups Opcodes
# Opcodes groups
#
class Groups < Msf::Ui::Gtk2::SkeletonOpcode
def initialize
comment = "opcode groups currently supported by the database :"
comment = "Opcode groups currently supported by the database :"
super("Groups", comment)
@ -177,11 +177,46 @@ class MsfOpcode
textview.set_editable(false)
textview.set_cursor_visible(false)
show_all and run
destroy
end
end
#
# Opcodes types
#
class Types < Msf::Ui::Gtk2::SkeletonOpcode
def initialize
comment = "List of the various specific opcode types supported by the database :"
super("Types", comment)
textview = Gtk::TextView.new
textbuffer = Gtk::TextBuffer.new
scrolled_window = Gtk::ScrolledWindow.new
scrolled_window.add(textview)
stuff.pack_start(scrolled_window, true, true, 5)
scrolled_window.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC)
# stuff.pack_start(textview, true, true, 0)
tps = "\n"
$client.types.each do |g|
tps << " - " + g.name + "\n"
end
textbuffer.set_text( tps )
textview.set_buffer(textbuffer)
textview.set_editable(false)
textview.set_cursor_visible(false)
show_all and run
destroy
end
end
#
# Modules Opcodes
#