From 9c7bc0ea51f41968c2f87e346f7adbc7fb4c51c5 Mon Sep 17 00:00:00 2001 From: Christian Frichot Date: Thu, 24 Nov 2011 22:06:21 +0800 Subject: [PATCH] Removed core dependancy on librex - installer advises, but doesn't install. Beef does NOT require librex, unless you actually enable the console.shell extension --- beef | 1 + core/loader.rb | 2 -- extensions/console/extension.rb | 1 - extensions/console/shell.rb | 4 ++++ install | 4 +++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/beef b/beef index 223d478c3..74a3e75f8 100755 --- a/beef +++ b/beef @@ -101,6 +101,7 @@ BeEF::API::Registrar.instance.fire(BeEF::API::Server, 'pre_http_start', http_hoo # @note Start the HTTP Server, we addtionally check whether we load the Console Shell or not if config.get("beef.extension.console.shell.enable") == true + require 'extensions/console/shell' puts "" begin FileUtils.mkdir_p(File.expand_path(config.get("beef.extension.console.shell.historyfolder"))) diff --git a/core/loader.rb b/core/loader.rb index f811d54f9..8b472d9d9 100644 --- a/core/loader.rb +++ b/core/loader.rb @@ -30,8 +30,6 @@ require 'xmlrpc/client' require 'erubis' require 'openssl' require 'term/ansicolor' -require 'rex' -require 'rex/ui' # @note Include the filters require 'core/filters' diff --git a/extensions/console/extension.rb b/extensions/console/extension.rb index bcc38faf8..0f0b390e1 100644 --- a/extensions/console/extension.rb +++ b/extensions/console/extension.rb @@ -60,4 +60,3 @@ end require 'extensions/console/banners' require 'extensions/console/commandline' -require 'extensions/console/shell' diff --git a/extensions/console/shell.rb b/extensions/console/shell.rb index 688b1ede6..c40ed5614 100644 --- a/extensions/console/shell.rb +++ b/extensions/console/shell.rb @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +require 'rex' +require 'rex/ui' + module BeEF module Extension module Console diff --git a/install b/install index e0f50a5ef..9d111a2d0 100644 --- a/install +++ b/install @@ -34,7 +34,7 @@ puts "\nPlease make sure you have installed SQLite before proceeding. For instr # array of required gems - add to as needed (specify a version if needed eg "gem_name, =x.x.x") $gems_required = ["thin", "ansi", "term-ansicolor", "dm-core", "json", "data_objects", "do_sqlite3", "sqlite3", "dm-sqlite-adapter", - "parseconfig", "erubis", "dm-migrations", "librex, =0.0.52"] + "parseconfig", "erubis", "dm-migrations"] # array of missing non-version specific gems installed $gems_missing = Array.new @@ -139,3 +139,5 @@ else puts "\nThe Default username/password are beef/beef\n\n" puts "\nAll feedback welcome - http://beef.googlecode.com/\n\n" end + +puts "*** If you wish experiment with the shell interface ensure you also run:\nsudo gem install librex -v0.0.52 --no-rdoc --no-ri\n\n"