From 225c6da616e536d909f0f023194ca38807f1dd9b Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Tue, 12 Aug 2014 10:47:26 -0500 Subject: [PATCH 1/2] Remove rubocop because it causes backtrace MSP-11046 See https://gist.github.com/limhoff-r7/7c398b5f4c44ed40cf1f --- Gemfile | 2 -- Gemfile.lock | 15 --------------- 2 files changed, 17 deletions(-) diff --git a/Gemfile b/Gemfile index d25604c26a..d9c827c8a0 100755 --- a/Gemfile +++ b/Gemfile @@ -15,8 +15,6 @@ group :db do end group :development do - # Style/sanity checking Ruby code - gem 'rubocop' # Markdown formatting for yard gem 'redcarpet' # generating documentation diff --git a/Gemfile.lock b/Gemfile.lock index e810a6a52a..71511c4719 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,7 +45,6 @@ GEM arel (3.0.3) arel-helpers (2.0.1) activerecord (>= 3.1.0, < 5) - ast (2.0.0) bcrypt (3.1.7) builder (3.0.4) coderay (1.1.0) @@ -88,12 +87,8 @@ GEM nokogiri (1.6.3.1) mini_portile (= 0.6.0) packetfu (1.1.9) - parser (2.1.9) - ast (>= 1.1, < 3.0) - slop (~> 3.4, >= 3.4.5) pcaprub (0.11.3) pg (0.17.1) - powerpack (0.0.9) pry (0.10.0) coderay (~> 1.1.0) method_source (~> 0.8.1) @@ -112,7 +107,6 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - rainbow (2.0.0) rake (10.3.2) rdoc (3.12.2) json (~> 1.4) @@ -138,14 +132,6 @@ GEM rspec-core (~> 2.99.0) rspec-expectations (~> 2.99.0) rspec-mocks (~> 2.99.0) - rubocop (0.23.0) - json (>= 1.7.7, < 2) - parser (~> 2.1.9) - powerpack (~> 0.0.6) - rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.4) - ruby-progressbar (1.5.1) - activesupport (>= 3.0.0) rubyntlm (0.4.0) rubyzip (1.1.6) shoulda-matchers (2.6.2) @@ -185,7 +171,6 @@ DEPENDENCIES redcarpet rspec (>= 2.12, < 3.0.0) rspec-rails (>= 2.12, < 3.0.0) - rubocop shoulda-matchers simplecov (= 0.5.4) timecop From e051272a20942e8afde988f7254757841737472f Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Tue, 12 Aug 2014 10:49:35 -0500 Subject: [PATCH 2/2] Fix typo MSP-11046 `ActiveSupport::OrderedOptions` automatically create an attribute for any missing keys, so when `options.console.resource` was used it would return `nil` instead of the erroring. The correct option name was `options.console.resources` (note the pluralization). --- lib/metasploit/framework/command/console.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/metasploit/framework/command/console.rb b/lib/metasploit/framework/command/console.rb index 6395352822..628d0849c8 100644 --- a/lib/metasploit/framework/command/console.rb +++ b/lib/metasploit/framework/command/console.rb @@ -47,7 +47,7 @@ class Metasploit::Framework::Command::Console < Metasploit::Framework::Command:: driver_options['ModulePath'] = options.modules.path driver_options['Plugins'] = options.console.plugins driver_options['RealReadline'] = options.console.real_readline - driver_options['Resource'] = options.console.resource + driver_options['Resource'] = options.console.resources driver_options['XCommands'] = options.console.commands @driver_options = driver_options