Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beef does not start #1540

Closed
glaucobonomo opened this issue Apr 14, 2018 · 2 comments
Closed

beef does not start #1540

glaucobonomo opened this issue Apr 14, 2018 · 2 comments

Comments

@glaucobonomo
Copy link

i am using beef version 0.4.7.0, ruby version ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu], on kali linux 3 amd64
i downloaded fromgit, installed it and it say succesfullt installed,i run ./beef and this happens....

/opt/beef# ./beef
Traceback (most recent call last):
10: from ./beef:44:in <main>' 9: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require'
8: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' 7: from /opt/beef/core/loader.rb:10:in <top (required)>'
6: from /usr/lib/ruby/vendor_ruby/bundler.rb:114:in require' 5: from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:65:in require'
4: from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:65:in each' 3: from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:76:in block in require'
2: from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:76:in each' 1: from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:80:in block (2 levels) in require'
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:84:in rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError) Gem Load Error is: wrong argument type Class (expected Module) Backtrace for gem load error is: /usr/lib/ruby/vendor_ruby/v8/conversion.rb:23:in include'
/usr/lib/ruby/vendor_ruby/v8/conversion.rb:23:in block (2 levels) in <top (required)>' /usr/lib/ruby/vendor_ruby/v8/conversion.rb:22:in class_eval'
/usr/lib/ruby/vendor_ruby/v8/conversion.rb:22:in block in <top (required)>' /usr/lib/ruby/vendor_ruby/v8/conversion.rb:21:in each'
/usr/lib/ruby/vendor_ruby/v8/conversion.rb:21:in <top (required)>' /var/lib/gems/2.5.0/gems/therubyracer-0.12.2/lib/v8.rb:22:in require'
/var/lib/gems/2.5.0/gems/therubyracer-0.12.2/lib/v8.rb:22:in <top (required)>' /var/lib/gems/2.5.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:108:in require'
/var/lib/gems/2.5.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:108:in available?' /var/lib/gems/2.5.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in each'
/var/lib/gems/2.5.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in find' /var/lib/gems/2.5.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in best_available'
/var/lib/gems/2.5.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:57:in autodetect' /var/lib/gems/2.5.0/gems/execjs-2.7.0/lib/execjs.rb:5:in module:ExecJS'
/var/lib/gems/2.5.0/gems/execjs-2.7.0/lib/execjs.rb:4:in <top (required)>' /var/lib/gems/2.5.0/gems/uglifier-4.1.9/lib/uglifier.rb:5:in require'
/var/lib/gems/2.5.0/gems/uglifier-4.1.9/lib/uglifier.rb:5:in <top (required)>' /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:81:in require'
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:81:in block (2 levels) in require' /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:76:in each'
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:76:in block in require' /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:65:in each'
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:65:in require' /usr/lib/ruby/vendor_ruby/bundler.rb:114:in require'
/opt/beef/core/loader.rb:10:in <top (required)>' /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' ./beef:44:in

'
Bundler Error Backtrace:

i did not change any options or script before opening iit, i would have done it later on, but i tried as soon as i have installed it, to see if it was working

@bcoles
Copy link
Collaborator

bcoles commented Apr 21, 2018

BeEF has not been tested on Ruby 2.5.x.

Your issue is with the Gem uglifier.

Try this:

diff --git a/Gemfile b/Gemfile
index 40eff9a..e26eacc 100644
--- a/Gemfile
+++ b/Gemfile
@@ -25,13 +25,7 @@ gem 'espeak-ruby', '>= 1.0.4' # Text-to-Voice
 gem 'nokogiri', '>= 1.7'
 gem 'rake'
 
-if RUBY_PLATFORM.downcase.include?('linux')
-  if File.readlines('/etc/os-release').grep(/^ID=(kali|parrot)/).any?
-    gem 'therubyracer', '0.12.2'
-  else
-    gem 'therubyracer', '0.12.3'
-  end
-end
+gem 'therubyracer', '0.12.2'
 
 # SQLite support
 group :sqlite do

Then bundle install.

@bcoles
Copy link
Collaborator

bcoles commented May 2, 2018

This issue should now be resolved. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants