minor update
git-svn-id: file:///home/svn/framework3/trunk@4980 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Binary file not shown.
@@ -182,7 +182,7 @@
|
||||
<signal name="activate" handler="on_databases_activate" last_modification_time="Sat, 24 Mar 2007 22:11:21 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image51">
|
||||
<widget class="GtkImage" id="image58">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-network</property>
|
||||
<property name="icon_size">1</property>
|
||||
@@ -225,7 +225,7 @@
|
||||
<signal name="activate" handler="on_logs_activate" last_modification_time="Mon, 21 May 2007 20:37:06 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image52">
|
||||
<widget class="GtkImage" id="image59">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-zoom-fit</property>
|
||||
<property name="icon_size">1</property>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Define background for msfconsole
|
||||
|
||||
style "textview"
|
||||
{
|
||||
base[NORMAL] = { 0.0, 0.0, 0.0 } # black
|
||||
fg[NORMAL] = { 1.0, 1.0, 1.0 } # white
|
||||
text[NORMAL] = { 1.0, 1.0, 1.0 } # white
|
||||
|
||||
fontset="-*-lucida-medium-r-*-*-14-*-*-*-*-*-*-*"
|
||||
}
|
||||
|
||||
# Attach style with the specific widget name
|
||||
widget_class "GtkWindow.GtkVBox.GtkHBox.GtkNotebook.GtkScrolledWindow.GtkTextView" style "textview"
|
||||
|
||||
|
||||
@@ -83,6 +83,9 @@ module Msf
|
||||
include Msf::Ui::Gtk2::MyControls
|
||||
|
||||
def initialize
|
||||
# console_style = File.join(driver.resource_directory, 'style', 'main.rc')
|
||||
# Gtk::RC.parse(console_style)
|
||||
|
||||
super('window')
|
||||
|
||||
# Set a default icon for all widgets
|
||||
@@ -165,9 +168,7 @@ module Msf
|
||||
# Actions for OpCodes/Stats
|
||||
#
|
||||
def on_stats_activate
|
||||
t_run = Thread.new do
|
||||
MsfOpcode::Stats.new()
|
||||
end
|
||||
MsfOpcode::Stats.new()
|
||||
end
|
||||
|
||||
#
|
||||
@@ -239,14 +240,14 @@ module Msf
|
||||
def on_options_activate
|
||||
MsfParameters::Options.new()
|
||||
end
|
||||
|
||||
|
||||
#
|
||||
# Action for "Window/Logs" menu
|
||||
#
|
||||
def on_logs_activate
|
||||
MsfWindow::Logs.new
|
||||
MsfWindow::Logs.new
|
||||
end
|
||||
|
||||
|
||||
#
|
||||
# The About Dialog
|
||||
#
|
||||
|
||||
@@ -19,25 +19,31 @@ module Msf
|
||||
|
||||
# call the parent
|
||||
super("Groups", comment)
|
||||
|
||||
begin
|
||||
textview = Gtk::TextView.new
|
||||
textbuffer = Gtk::TextBuffer.new
|
||||
stuff.pack_start(textview, true, true, 0)
|
||||
|
||||
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
|
||||
|
||||
gs = "\n"
|
||||
$client.groups.each do |g|
|
||||
gs << " - " + g.name + "\n"
|
||||
textbuffer.set_text(gs)
|
||||
|
||||
textview.set_buffer(textbuffer)
|
||||
textview.set_editable(false)
|
||||
textview.set_cursor_visible(false)
|
||||
|
||||
show_all and run
|
||||
destroy
|
||||
rescue ::Exception => e
|
||||
MsfDialog::Error.new(self, e)
|
||||
end
|
||||
|
||||
textbuffer.set_text( gs )
|
||||
|
||||
textview.set_buffer(textbuffer)
|
||||
textview.set_editable(false)
|
||||
textview.set_cursor_visible(false)
|
||||
|
||||
show_all and run
|
||||
destroy
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -21,27 +21,33 @@ module Msf
|
||||
super("Locales", comment)
|
||||
|
||||
self.set_default_size(500, 230)
|
||||
|
||||
begin
|
||||
textview = Gtk::TextView.new
|
||||
textbuffer = Gtk::TextBuffer.new
|
||||
stuff.pack_start(textview, true, true, 0)
|
||||
|
||||
textview = Gtk::TextView.new
|
||||
textbuffer = Gtk::TextBuffer.new
|
||||
stuff.pack_start(textview, true, true, 0)
|
||||
locales = "\n"
|
||||
$client.locales.each do |locale|
|
||||
locales << " -" + locale.name + "\n"
|
||||
end
|
||||
|
||||
locales = "\n"
|
||||
$client.locales.each do |locale|
|
||||
locales << " -" + locale.name + "\n"
|
||||
textbuffer.set_text( locales )
|
||||
|
||||
textview.set_buffer(textbuffer)
|
||||
textview.set_editable(false)
|
||||
textview.set_cursor_visible(false)
|
||||
|
||||
show_all and run
|
||||
destroy
|
||||
rescue ::Exception => e
|
||||
MsfDialog::Error.new(self, e)
|
||||
end
|
||||
|
||||
textbuffer.set_text( locales )
|
||||
|
||||
textview.set_buffer(textbuffer)
|
||||
textview.set_editable(false)
|
||||
textview.set_cursor_visible(false)
|
||||
|
||||
show_all and run
|
||||
destroy
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -19,25 +19,31 @@ module Msf
|
||||
|
||||
# call the parent
|
||||
super("Metatypes", comment)
|
||||
|
||||
begin
|
||||
textview = Gtk::TextView.new
|
||||
textbuffer = Gtk::TextBuffer.new
|
||||
stuff.pack_start(textview, true, true, 0)
|
||||
|
||||
textview = Gtk::TextView.new
|
||||
textbuffer = Gtk::TextBuffer.new
|
||||
stuff.pack_start(textview, true, true, 0)
|
||||
mts = "\n"
|
||||
$client.meta_types.each do |mt|
|
||||
mts << " - " + mt.name + "\n"
|
||||
end
|
||||
|
||||
mts = "\n"
|
||||
$client.meta_types.each do |mt|
|
||||
mts << " - " + mt.name + "\n"
|
||||
textbuffer.set_text( mts )
|
||||
|
||||
textview.set_buffer(textbuffer)
|
||||
textview.set_editable(false)
|
||||
textview.set_cursor_visible(false)
|
||||
|
||||
show_all and run
|
||||
destroy
|
||||
rescue ::Exception => e
|
||||
MsfDialog::Error.new(self, e)
|
||||
end
|
||||
|
||||
textbuffer.set_text( mts )
|
||||
|
||||
textview.set_buffer(textbuffer)
|
||||
textview.set_editable(false)
|
||||
textview.set_cursor_visible(false)
|
||||
|
||||
show_all and run
|
||||
destroy
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -66,7 +66,11 @@ module Msf
|
||||
|
||||
signal_connect('response') do |dialog, response_id|
|
||||
if response_id == Gtk::Dialog::RESPONSE_OK
|
||||
collect()
|
||||
begin
|
||||
collect()
|
||||
rescue ::Exception => e
|
||||
MsfDialog::Error.new(self, e)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -20,28 +20,34 @@ module Msf
|
||||
# call the parent
|
||||
super("Platforms", comment)
|
||||
|
||||
textview = Gtk::TextView.new
|
||||
textbuffer = Gtk::TextBuffer.new
|
||||
begin
|
||||
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)
|
||||
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)
|
||||
|
||||
ps = "\n"
|
||||
$client.platforms.each do |p|
|
||||
ps << " - " + p.desc + "\n"
|
||||
ps = "\n"
|
||||
$client.platforms.each do |p|
|
||||
ps << " - " + p.desc + "\n"
|
||||
end
|
||||
|
||||
textbuffer.set_text( ps )
|
||||
|
||||
textview.set_buffer(textbuffer)
|
||||
textview.set_editable(false)
|
||||
textview.set_cursor_visible(false)
|
||||
|
||||
show_all and run
|
||||
destroy
|
||||
rescue ::Exception => e
|
||||
MsfDialog::Error.new(self, e)
|
||||
end
|
||||
|
||||
textbuffer.set_text( ps )
|
||||
|
||||
textview.set_buffer(textbuffer)
|
||||
textview.set_editable(false)
|
||||
textview.set_cursor_visible(false)
|
||||
|
||||
show_all and run
|
||||
destroy
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -22,31 +22,37 @@ module Msf
|
||||
|
||||
self.set_default_size(500, 230)
|
||||
|
||||
stats = $client.statistics
|
||||
begin
|
||||
stats = $client.statistics
|
||||
|
||||
textview = Gtk::TextView.new
|
||||
textbuffer = Gtk::TextBuffer.new
|
||||
stuff.pack_start(textview, true, true, 0)
|
||||
textview = Gtk::TextView.new
|
||||
textbuffer = Gtk::TextBuffer.new
|
||||
stuff.pack_start(textview, true, true, 0)
|
||||
|
||||
textbuffer.set_text(
|
||||
"\n" +
|
||||
"Last Updated : #{stats.last_update.to_s}\n" +
|
||||
"Number of Opcodes : #{stats.opcodes}\n" +
|
||||
"Number of Opcode Types : #{stats.opcode_types}\n" +
|
||||
"Number of Platforms : #{stats.platforms}\n" +
|
||||
"Number of Architectures : #{stats.architectures}\n" +
|
||||
"Number of Modules : #{stats.modules}\n" +
|
||||
"Number of Module Segments: #{stats.module_segments}\n" +
|
||||
"Number of Module Imports : #{stats.module_imports}\n" +
|
||||
"Number of Module Exports : #{stats.module_exports}\n\n")
|
||||
textbuffer.set_text(
|
||||
"\n" +
|
||||
"Last Updated : #{stats.last_update.to_s}\n" +
|
||||
"Number of Opcodes : #{stats.opcodes}\n" +
|
||||
"Number of Opcode Types : #{stats.opcode_types}\n" +
|
||||
"Number of Platforms : #{stats.platforms}\n" +
|
||||
"Number of Architectures : #{stats.architectures}\n" +
|
||||
"Number of Modules : #{stats.modules}\n" +
|
||||
"Number of Module Segments: #{stats.module_segments}\n" +
|
||||
"Number of Module Imports : #{stats.module_imports}\n" +
|
||||
"Number of Module Exports : #{stats.module_exports}\n\n")
|
||||
|
||||
textview.set_buffer(textbuffer)
|
||||
textview.set_editable(false)
|
||||
textview.set_cursor_visible(false)
|
||||
textview.set_buffer(textbuffer)
|
||||
textview.set_editable(false)
|
||||
textview.set_cursor_visible(false)
|
||||
|
||||
show_all and run
|
||||
destroy
|
||||
show_all and run
|
||||
destroy
|
||||
rescue ::Exception => e
|
||||
MsfDialog::Error.new(self, e)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -20,28 +20,34 @@ module Msf
|
||||
# call the parent
|
||||
super("Types", comment)
|
||||
|
||||
textview = Gtk::TextView.new
|
||||
textbuffer = Gtk::TextBuffer.new
|
||||
begin
|
||||
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)
|
||||
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)
|
||||
|
||||
tps = "\n"
|
||||
$client.types.each do |g|
|
||||
tps << " - " + g.name + "\n"
|
||||
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
|
||||
rescue ::Exception => e
|
||||
MsfDialog::Error.new(self, e)
|
||||
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
|
||||
|
||||
end
|
||||
|
||||
@@ -12,6 +12,9 @@ module Msf
|
||||
include Msf::Ui::Gtk2::MyControls
|
||||
|
||||
def initialize
|
||||
console_style = File.join(driver.resource_directory, 'style', 'console.rc')
|
||||
Gtk::RC.parse(console_style)
|
||||
|
||||
# call the parent
|
||||
super("MsfLogs")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user