metasploit-framework/lib/msf/ui/gtk2/window/logs.rb

44 lines
880 B
Ruby
Raw Normal View History

module Msf
module Ui
module Gtk2
class MsfWindow
#
#
#
class Logs < Msf::Ui::Gtk2::SkeletonBasic
include Msf::Ui::Gtk2::MyControls
def initialize
# call the parent
super("MsfLogs")
# Define the size and border
set_default_size(400, 400)
set_border_width(10)
# Main hbox
vbox = Gtk::VBox.new(false, 0)
add(vbox)
textview = Gtk::TextView.new($gtk2driver.log_text.buffer)
sw = Gtk::ScrolledWindow.new()
sw.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC)
vbox.pack_start(sw, true, true, 0)
sw.add(textview)
show_all
end
end
end
end
end
end