Changeset 5491
- Timestamp:
- 04/22/08 18:20:35 (3 weeks ago)
- Files:
-
- framework3/trunk/data/msfgui/msfgui.glade (modified) (1 diff)
- framework3/trunk/lib/msf/ui/gtk2/app.rb (modified) (1 diff)
- framework3/trunk/lib/msf/ui/gtk2/driver.rb (modified) (1 diff)
- framework3/trunk/lib/msf/ui/gtk2/window/consoles.rb (modified) (2 diffs)
- framework3/trunk/modules/auxiliary/server/capture/http.rb (modified) (7 diffs)
- framework3/trunk/modules/payloads/singles/linux/x86/chmod.rb (modified) (1 prop)
- framework3/trunk/msfgui (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
framework3/trunk/data/msfgui/msfgui.glade
r5345 r5491 7 7 <property name="border_width">5</property> 8 8 <property name="width_request">800</property> 9 <property name="height_request"> 600</property>9 <property name="height_request">400</property> 10 10 <property name="title" translatable="yes"></property> 11 11 <property name="type">GTK_WINDOW_TOPLEVEL</property> framework3/trunk/lib/msf/ui/gtk2/app.rb
r5380 r5491 184 184 $gtk2driver.append_log_view("Initialized the Metasploit Framework GUI.\n") 185 185 186 # Handle any initalization options 187 process_cli_options() 188 end 189 190 def process_cli_options 191 res = $gtk2driver.opts['Resource'] || return 192 data = "" 193 begin 194 data = File.read(res) 195 rescue ::Exception => e 196 $gtk2driver.append_log_view("Failed to open the resource file: #{e}\n") 197 return 198 end 199 200 # spawn a new console 201 pipe = MsfWindow::Consoles.new.last_console.pipe 202 203 data.each_line do |line| 204 line.strip 205 next if line.length == 0 206 next if line =~ /^#/ 207 $gtk2driver.append_log_view("Executing: #{line}...\n") 208 pipe.write_input(line + "\n") 209 end 210 186 211 end 187 212 framework3/trunk/lib/msf/ui/gtk2/driver.rb
r5339 r5491 180 180 # 181 181 attr_accessor :active_module, :exploit 182 183 protected184 185 182 attr_writer :framework # :nodoc: 186 183 attr_accessor :opts # :nodoc: framework3/trunk/lib/msf/ui/gtk2/window/consoles.rb
r5335 r5491 32 32 } 33 33 ) 34 34 self 35 35 end 36 36 … … 355 355 text.stop_console 356 356 end 357 358 @last_console = text 357 359 358 360 end 359 361 360 362 include Msf::Ui::Gtk2::MyControls 361 363 attr_accessor :last_console 364 362 365 def initialize 363 366 framework3/trunk/modules/auxiliary/server/capture/http.rb
r5490 r5491 60 60 end 61 61 62 def setup63 super64 @state = {}65 end66 67 62 def run 68 63 @formsdir = datastore['FORMSDIR'] … … 71 66 @myhost = datastore['SRVHOST'] 72 67 @myport = datastore['SRVPORT'] 68 Thread.current.priority = 20 73 69 exploit() 74 70 end 75 71 76 72 def on_client_connect(c) 77 @state[c.peerhost] ||= {78 :ip => c.peerhost,79 :sites => {}80 }81 73 c.extend(Rex::Proto::Http::ServerClient) 82 74 c.init_cli(self) … … 84 76 85 77 def on_client_data(cli) 86 87 78 begin 88 79 data = cli.get_once(-1, 5) … … 91 82 when Rex::Proto::Http::Packet::ParseCode::Completed 92 83 dispatch_request(cli, cli.request) 93 94 84 cli.reset_cli 95 85 when Rex::Proto::Http::Packet::ParseCode::Error … … 102 92 end 103 93 104 close_client(cli) 94 close_client(cli) 105 95 end 106 96 … … 110 100 111 101 def dispatch_request(cli, req) 102 103 phost = cli.peerhost 112 104 113 105 os_name = nil … … 232 224 return 233 225 end 234 226 227 report_note( 228 :host => cli.peerhost, 229 :type => "http_request", 230 :data => "#{hhead}:#{@myport} #{req.method} #{req.resource} #{os_name} #{ua_name} #{ua_vers}" 231 ) 232 235 233 print_status("HTTP REQUEST #{cli.peerhost} > #{hhead}:#{@myport} #{req.method} #{req.resource} #{os_name} #{ua_name} #{ua_vers} cookies=#{cookies}") 236 234 framework3/trunk/modules/payloads/singles/linux/x86/chmod.rb
- Property svn:keywords set to Rev Revision Id Header
framework3/trunk/msfgui
r5407 r5491 19 19 $stderr.puts "[*] The msfgui interface requires the ruby-gtk2 and ruby-libglade2 packages" 20 20 $stderr.puts "[*] Dependencies include ruby-pango, ruby-glib2, ruby-gdkpixbuf2, and ruby-atk" 21 $stderr.puts "[*] Error: #{e.class} #{e}" 21 22 exit(0) 22 23 end … … 36 37 arguments = Rex::Parser::Arguments.new( 37 38 "-v" => [ true, "A number between 0 and 3 that controls log verbosity" ], 39 "-r" => [ true, "Execute the specified resource file" ], 38 40 "-d" => [ false, "Keep running in the foreground" ], 39 41 "-D" => [ false, "Keep stdio and stderr open for debugging" ], … … 49 51 when "-v" 50 52 opts['LogLevel'] = val 53 when "-r" 54 opts['Resource'] = val 51 55 when "-d" 52 56 foreground = false
