This giant pile of bizzare image foo solves an issue with GLib not being able to parse international path names.

git-svn-id: file:///home/svn/framework3/trunk@5934 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-11-17 04:34:09 +00:00
parent aac553feea
commit 25a8621e72
23 changed files with 49 additions and 45 deletions

Binary file not shown.

Binary file not shown.

BIN
data/msfgui/pix/bomb.xpm.gz Normal file

Binary file not shown.

BIN
data/msfgui/pix/bug.xpm.gz Normal file

Binary file not shown.

View File

@ -0,0 +1,22 @@
dir = Dir.open(".")
dir.entries.each do |ent|
next if ent !~ /\.png$/
xpm = ent.sub(".png", ".xpm")
raw = ""
system("rm -f #{xpm} #{xpm}.gz")
system("convert #{ent} #{xpm}")
File.readlines(xpm).each do |line|
line.strip!
next if line !~ /^\"/
raw << line.gsub(/^\"|\",?$/, '') + "\n"
end
fd = File.open(xpm, "wb")
fd.write(raw)
fd.close
system("gzip -9 #{xpm}")
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
data/msfgui/pix/zoom.xpm.gz Normal file

Binary file not shown.

View File

@ -28,7 +28,7 @@ module Msf
self.authors = Gtk2::AUTHORS
self.documenters = Gtk2::DOCUMENTERS
self.artists = Gtk2::ARTISTS
self.logo = driver.get_icon('splash.png')
self.logo = driver.get_icon('splash.xpm')
self.website = Gtk2::WEBSITE_URL
self.license = File.read(File.join(Msf::Config.install_root, 'README'))
self.transient_for = parent

View File

@ -98,7 +98,7 @@ module Ui
set_default_size(460,301)
set_border_width(5)
image = Gtk::Image.new(driver.get_icon("splash.png"))
image = Gtk::Image.new(driver.get_icon("splash.xpm"))
add(image)
show_all

View File

@ -255,27 +255,7 @@ module Msf
da = Gtk::DrawingArea.new
da.set_size_request(600, 60)
if(da.window.respond_to?('create_cairo_context'))
Signal
da.signal_connect('expose-event') do |widget, event|
cr = widget.window.create_cairo_context
cr.scale(*widget.window.size)
cr.set_line_width(0.04)
cr.new_path
image = Cairo::ImageSurface.from_png(driver.get_image("banner_assistant.png"))
cr.scale(1.0 / image.width, 1.0 / image.height)
cr.set_source(image, 0, 0)
cr.paint
end
else
# Ugly, but better than a crash
da = Gtk::Image.new(driver.get_image("banner_assistant.png"))
end
da = Gtk::Image.new(driver.get_icon("banner_assistant.xpm"))
return da
end

View File

@ -49,9 +49,9 @@ module Msf
@parent_remote_init = remote
# Define the icons for folders and files
@file_pixbuf = Gdk::Pixbuf.new(driver.get_image("msf_file.png"))
@folder_pixbuf = Gdk::Pixbuf.new(driver.get_image("msf_folder.png"))
@local_folder_pixbuf = Gdk::Pixbuf.new(driver.get_image("msf_local_folder.png"))
@file_pixbuf = Gdk::Pixbuf.new(driver.get_image("msf_file.xpm"))
@folder_pixbuf = Gdk::Pixbuf.new(driver.get_image("msf_folder.xpm"))
@local_folder_pixbuf = Gdk::Pixbuf.new(driver.get_image("msf_local_folder.xpm"))
@model_local.set_default_sort_func do |a, b|
if !a[COL_IS_DIR] and b[COL_IS_DIR]

View File

@ -137,7 +137,9 @@ module Ui
# Returns a new Gdk::Pixbuf object
#
def get_icon(name)
Gdk::Pixbuf.new(File.join(resource_directory, 'pix', name))
path = get_image(name) + ".gz"
buff = File.read(path, File.size(path))
Gdk::Pixbuf.new(Rex::Text.ungzip(buff).split("\n"))
end
#

View File

@ -100,12 +100,12 @@ module Msf
# Add AutoPWN - DISABLED FOR NOW
# @autopwn_iter = @model.append(nil)
# @autopwn_iter.set_value(PIX, driver.get_icon("menu_autopwn.png"))
# @autopwn_iter.set_value(PIX, driver.get_icon("menu_autopwn.xpm"))
# @autopwn_iter.set_value(JID, "AutoPWN")
# Add Parent "One shot"
@oneshot_iter = @model.append(nil)
@oneshot_iter.set_value(PIX, driver.get_icon("menu_oneshot.png"))
@oneshot_iter.set_value(PIX, driver.get_icon("menu_oneshot.xpm"))
@oneshot_iter.set_value(JID, "Jobs")
# Job Gtk::Menu
@ -228,12 +228,12 @@ module Msf
@model.clear
# Add AutoPWN
#@autopwn_iter = @model.append(nil)
#@autopwn_iter.set_value(PIX, driver.get_icon("menu_autopwn.png"))
#@autopwn_iter.set_value(PIX, driver.get_icon("menu_autopwn.xpm"))
#@autopwn_iter.set_value(JID, "AutoPWN")
# Add Parent "One shot"
@oneshot_iter = @model.append(nil)
@oneshot_iter.set_value(PIX, driver.get_icon("menu_oneshot.png"))
@oneshot_iter.set_value(PIX, driver.get_icon("menu_oneshot.xpm"))
@oneshot_iter.set_value(JID, "Jobs")
end

View File

@ -335,10 +335,10 @@ module Gtk2
add_modules_to_store(
@model, nil, "Exploits", mod_exploits,
{
:top_icon => "bug.png",
:top_icon => "bug.xpm",
:top_desc => "All loaded exploit modules (#{framework.stats.num_exploits.to_s})",
:dir_icon => "gnome-fs-directory.png",
:mod_icon => "bug.png",
:dir_icon => "gnome-fs-directory.xpm",
:mod_icon => "bug.xpm",
:type => EXP
}
)
@ -346,10 +346,10 @@ module Gtk2
add_modules_to_store(
@model, nil, "Auxiliary", mod_auxiliary,
{
:top_icon => "zoom.png",
:top_icon => "zoom.xpm",
:top_desc => "All loaded auxiliary modules (#{framework.stats.num_auxiliary.to_s})",
:dir_icon => "gnome-fs-directory.png",
:mod_icon => "zoom.png",
:dir_icon => "gnome-fs-directory.xpm",
:mod_icon => "zoom.xpm",
:type => AUX
}
)
@ -359,7 +359,7 @@ module Gtk2
#
# # Add Parent "Payloads (nbr payloads)"
# iter = @model.append(nil)
# iter.set_value(PIX, driver.get_icon("bomb.png"))
# iter.set_value(PIX, driver.get_icon("bomb.xpm"))
# iter.set_value(NAME, "Payloads (#{framework.stats.num_payloads.to_s})")
# iter.set_value(MOD, nil)
# iter.set_value(ADV, true)
@ -378,7 +378,7 @@ module Gtk2
#
# # Add Parent "Nops (nbr nops)"
# iter = @model.append(nil)
# iter.set_value(PIX, driver.get_icon("encoders.png"))
# iter.set_value(PIX, driver.get_icon("encoders.xpm"))
# iter.set_value(NAME, "NOPs (#{framework.stats.num_nops.to_s})")
# iter.set_value(MOD, nil)
# iter.set_value(ADV, true)
@ -397,7 +397,7 @@ module Gtk2
#
# # Add Parent "Encoders (nbr encoders)"
# iter = @model.append(nil)
# iter.set_value(PIX, driver.get_icon("encoders.png"))
# iter.set_value(PIX, driver.get_icon("encoders.xpm"))
# iter.set_value(NAME, "Encoders (#{framework.stats.num_encoders.to_s})")
# iter.set_value(MOD, nil)
# iter.set_value(ADV, true)