beefproject / beef

The Browser Exploitation Framework Project
https://beefproject.com
9.71k stars 2.14k forks source link

There was an error while trying to load the gem 'uglifier' #1504

Closed gearcapitan closed 6 years ago

gearcapitan commented 6 years ago

kali linux-2018-02-09-20-04-44 Verify first that your issue/request has not been posted previously:

Ensure you're using the latest version of BeEF.

Environment

What version/revision of BeEF are you using?

On what version of Ruby?

On what browser?

On what operating system?

Configuration

Are you using a non-default configuration?

Have you enabled or disabled any BeEF extensions?

Summary

Please provide a summary of the issue.

Expected Behaviour

What was the expected result?

Actual Behaviour

What was the actual result?

Steps to Reproduce

Please provide steps to reproduce this issue.

Additional Information

Please provide any additional information which may be useful in resolving this issue, such as debugging output and relevant screen shots.

bcoles commented 6 years ago

The issue is probably related to the therubyracer gem. Was the gem installed during bundle install ? Which version is in Gemfile.lock ?

You can try removing the Gemfile.lock file, then changing the version of therubyracer in Gemfile to 0.12.3, then do bundle install.

bcoles commented 6 years ago

Does the patch in the comment at the end of this thread work for you?

RavSS commented 6 years ago

I had the very same issue, and changing the version of the therubyracer gem alone solved it for me. Thanks!

bcoles commented 6 years ago

I've been able to reproduce this issue on Fedora 27.

Bumping the version of therubyracer in Gemfile from 0.12.2 to 0.12.3, then bundle install, resolved the issue.

Nicholasjaar commented 6 years ago

root@root:/home/rootubuntu/Desktop/hck/beef# ./update-beef Updating... Already up-to-date. root@root:/home/rootubuntu/Desktop/hck/beef# ./beef /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- bundler/setup (LoadError) from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /home/rootubuntu/Desktop/hck/beef/core/loader.rb:9:in <top (required)>' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from ./beef:44:in

'

Nicholasjaar commented 6 years ago

help me man :D

bcoles commented 6 years ago

@Nicholasjaar what have you tried? What OS? Are you using rvm/rbenv? Are you using BeEF from GitHub or a packaged version?

Nicholasjaar commented 6 years ago

hayır ben windowv yanında lubuntu işletim sistemi kullanıyor. paketi github dan çektim masaüstü indirdi.. ve böyle yükledi
chmod +x install-beef ./install (enter) daha sonra %70 yükledi ve bu sorunla karşılaştı.. eğer görüşmek gerek ise (BaylanDoğu) (facebook)

bcoles commented 6 years ago

@Nicholasjaar therubyracer hangi sürümünü kullanıyorsunuz?

rm Gemfile.lock
bundle install

Bu işe yaramazsa, Gemfile therubyracer 0.12.2 ile 0.12.3 arasında değiştirmeyi deneyin.

rm Gemfile.lock
bundle install
Nicholasjaar commented 6 years ago

ok şimdi deniyorum..

Nicholasjaar commented 6 years ago

@bcoles root@root:/home/rootubuntu/Desktop/hck/beef# rm Gemfile root@root:/home/rootubuntu/Desktop/hck/beef# ls arerules beef_key.pem doc install Rakefile tools beef config.yaml extensions liveCD README.md update-beef beef_cert.pem core INSTALL.txt modules test VERSION root@root:/home/rootubuntu/Desktop/hck/beef# bundle install 'bundle' programı şu anda kurulu değil. Kurulumunu şunu yazarak yapabilirsiniz: apt install ruby-bundler root@root:/home/rootubuntu/Desktop/hck/beef# apt install ruby-bundler Paket listeleri okunuyor... Bitti Bağımlılık ağacı oluşturuluyor
Durum bilgisi okunuyor... Bitti
Aşağıdaki ek paketler kurulacak: ruby-molinillo ruby-net-http-persistent ruby-thor Aşağıdaki YENİ paketler kurulacak: ruby-bundler ruby-molinillo ruby-net-http-persistent ruby-thor 0 paket yükseltilecek, 4 yeni paket kurulacak, 0 paket kaldırılacak ve 1 paket yükseltilmeyecek. 288 kB arşiv dosyası indirilecek. Bu işlem tamamlandıktan sonra 1,391 kB ek disk alanı kullanılacak. N: '/etc/apt/sources.list.d/' dizinindeki 'webupd8team-ubuntu-java-artful.list.save' dosyası geçersiz bir dosya uzantısı olduğu için yok sayılıyor N: '/etc/apt/sources.list.d/' dizinindeki 'metasploit-framework.list.save' dosyası geçersiz bir dosya uzantısı olduğu için yok sayılıyor Devam etmek istiyor musunuz? [E/h] e İndir: 1 http://archive.ubuntu.com/ubuntu artful/universe i386 ruby-molinillo all 0.5.0-2 [15.1 kB] İndir: 2 http://archive.ubuntu.com/ubuntu artful/universe i386 ruby-net-http-persistent all 2.9.4-1 [15.9 kB] İndir: 3 http://archive.ubuntu.com/ubuntu artful/universe i386 ruby-thor all 0.19.4-1 [43.9 kB] İndir: 4 http://archive.ubuntu.com/ubuntu artful/universe i386 ruby-bundler all 1.15.1-1 [214 kB] 0 sn.'de 288 kB alındı (355 kB/s) N: '/etc/apt/sources.list.d/' dizinindeki 'webupd8team-ubuntu-java-artful.list.save' dosyası geçersiz bir dosya uzantısı olduğu için yok sayılıyor N: '/etc/apt/sources.list.d/' dizinindeki 'metasploit-framework.list.save' dosyası geçersiz bir dosya uzantısı olduğu için yok sayılıyor Daha önce seçili olmayan ruby-molinillo paketi seçiliyor. (Veritabanı okunuyor ... 208023 dosya veya dizin kurulu durumda.) Paket açılacak: .../ruby-molinillo_0.5.0-2_all.deb ... Paket açılıyor: ruby-molinillo (0.5.0-2) ... Daha önce seçili olmayan ruby-net-http-persistent paketi seçiliyor. Paket açılacak: .../ruby-net-http-persistent_2.9.4-1_all.deb ... Paket açılıyor: ruby-net-http-persistent (2.9.4-1) ... Daha önce seçili olmayan ruby-thor paketi seçiliyor. Paket açılacak: .../ruby-thor_0.19.4-1_all.deb ... Paket açılıyor: ruby-thor (0.19.4-1) ... Daha önce seçili olmayan ruby-bundler paketi seçiliyor. Paket açılacak: .../ruby-bundler_1.15.1-1_all.deb ... Paket açılıyor: ruby-bundler (1.15.1-1) ... Ayarlanıyor: ruby-thor (0.19.4-1) ... Ayarlanıyor: ruby-net-http-persistent (2.9.4-1) ... Tetikleyiciler işleniyor: man-db (2.7.6.1-2) ... Ayarlanıyor: ruby-molinillo (0.5.0-2) ... Ayarlanıyor: ruby-bundler (1.15.1-1) ... root@root:/home/rootubuntu/Desktop/hck/beef# ls arerules beef_key.pem doc install Rakefile tools beef config.yaml extensions liveCD README.md update-beef beef_cert.pem core INSTALL.txt modules test VERSION root@root:/home/rootubuntu/Desktop/hck/beef# ./beef /home/rootubuntu/Desktop/hck/beef/core/loader.rb:10:in <top (required)>': private methodrequire' called for Bundler:Module (NoMethodError) from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from ./beef:44:in `

' root@root:/home/rootubuntu/Desktop/hck/beef#

bunları beef doyası ıcındeyken uyguladım

bcoles commented 6 years ago

You deleted Gemfile not Gemfile.lock

Bunu dene

git checkout Gemfile
bundle install
bcoles commented 6 years ago

uglifier therubyracer gerektirir

Bazı sistemler therubyracer 0.12.2 ihtiyaç duyar

Bazı sistemler therubyracer 0.12.3 ihtiyaç duyar

Bunu yapıyoruz ama çok iyi çalışmıyor

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

Bunu dene

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

o zaman bunu dene

bundle install
Nicholasjaar commented 6 years ago

In Gemfile: thin was resolved to 1.7.2, which depends on eventmachine

Nicholasjaar commented 6 years ago

Could not find gem 'eventmachine' in any of the gem sources listed in your Gemfile. Run bundle install to install missing gems.

ben bundle install diyor fakat sığır uyanmıyor..

Nicholasjaar commented 6 years ago

root@root:/home/rootubuntu/Desktop/hck/beef# beef 'beef' programı şu anda kurulu değil. Kurulumunu şunu yazarak yapabilirsiniz: apt install beef root@root:/home/rootubuntu/Desktop/hck/beef# apt install beef Paket listeleri okunuyor... Bitti Bağımlılık ağacı oluşturuluyor
Durum bilgisi okunuyor... Bitti
Aşağıdaki ek paketler kurulacak: libcattle-1.0-0 Aşağıdaki YENİ paketler kurulacak: beef libcattle-1.0-0 0 paket yükseltilecek, 2 yeni paket kurulacak, 0 paket kaldırılacak ve 1 paket yükseltilmeyecek. 31.9 kB arşiv dosyası indirilecek. Bu işlem tamamlandıktan sonra 110 kB ek disk alanı kullanılacak. N: '/etc/apt/sources.list.d/' dizinindeki 'webupd8team-ubuntu-java-artful.list.save' dosyası geçersiz bir dosya uzantısı olduğu için yok sayılıyor N: '/etc/apt/sources.list.d/' dizinindeki 'metasploit-framework.list.save' dosyası geçersiz bir dosya uzantısı olduğu için yok sayılıyor Devam etmek istiyor musunuz? [E/h] e İndir: 1 http://archive.ubuntu.com/ubuntu artful/universe i386 libcattle-1.0-0 i386 1.2.2-1 [20.0 kB] İndir: 2 http://archive.ubuntu.com/ubuntu artful/universe i386 beef i386 1.0.2-1 [11.9 kB] 0 sn.'de 31.9 kB alındı (69.7 kB/s) N: '/etc/apt/sources.list.d/' dizinindeki 'webupd8team-ubuntu-java-artful.list.save' dosyası geçersiz bir dosya uzantısı olduğu için yok sayılıyor N: '/etc/apt/sources.list.d/' dizinindeki 'metasploit-framework.list.save' dosyası geçersiz bir dosya uzantısı olduğu için yok sayılıyor Daha önce seçili olmayan libcattle-1.0-0:i386 paketi seçiliyor. (Veritabanı okunuyor ... 208372 dosya veya dizin kurulu durumda.) Paket açılacak: .../libcattle-1.0-0_1.2.2-1_i386.deb ... Paket açılıyor: libcattle-1.0-0:i386 (1.2.2-1) ... Daha önce seçili olmayan beef paketi seçiliyor. Paket açılacak: .../archives/beef_1.0.2-1_i386.deb ... Paket açılıyor: beef (1.0.2-1) ... Tetikleyiciler işleniyor: libc-bin (2.26-0ubuntu2.1) ... Tetikleyiciler işleniyor: man-db (2.7.6.1-2) ... Ayarlanıyor: libcattle-1.0-0:i386 (1.2.2-1) ... Ayarlanıyor: beef (1.0.2-1) ... Tetikleyiciler işleniyor: libc-bin (2.26-0ubuntu2.1) ... root@root:/home/rootubuntu/Desktop/hck/beef# beef Usage: beef [OPTION...] FILE root@root:/home/rootubuntu/Desktop/hck/beef#

bcoles commented 6 years ago

./beef not beef

Nicholasjaar commented 6 years ago

root@root:/home/rootubuntu/Desktop/hck/beef# beef Usage: beef [OPTION...] FILE root@root:/home/rootubuntu/Desktop/hck/beef#

Nicholasjaar commented 6 years ago

böyle yanıt verdi

bcoles commented 6 years ago

That is not BeEF. That is a different program.

Bunu dene ./beef

Nicholasjaar commented 6 years ago

2018-04-01-190943_1280x1024_scrot

bcoles commented 6 years ago

grep eventmachine Gemfile

grep eventmachine Gemfile.lock

Nicholasjaar commented 6 years ago

terminale yazıyorum bunu ? grep eventmachine Gemfile

grep eventmachine Gemfile.lock

bcoles commented 6 years ago

Yes. Check check if eventmachine is in Gemfile and Gemfile.lock

Nicholasjaar commented 6 years ago

2018-04-01-191417_1280x1024_scrot

bcoles commented 6 years ago

Change to the BeEF directory.

cd beef

Nicholasjaar commented 6 years ago

gem 'eventmachine'

bcoles commented 6 years ago

:(

I don't what is wrong.

The issue is probably related to #1532 and #1503.

Nicholasjaar commented 6 years ago

2018-04-01-191904_1280x1024_scrot

Nicholasjaar commented 6 years ago

1532 ve # 1503 bunun için bir çözüm varmı ?

bcoles commented 6 years ago

Unfortunately there is no patch yet.

Nicholasjaar commented 6 years ago

2018-04-01-194231_1280x1024_scrot

Nicholasjaar commented 6 years ago

2018-04-01-194336_1280x1024_scrot

Nicholasjaar commented 6 years ago

2018-04-01-194429_1280x1024_scrot

bcoles commented 6 years ago

Did you get it working?

Nicholasjaar commented 6 years ago

root@root:/home/rootubuntu/Desktop/hck/beef# gem list bundler

LOCAL GEMS

bundler (1.15.1)

Nicholasjaar commented 6 years ago

uğraşıyorum..

bcoles commented 6 years ago

Good luck :)

Nicholasjaar commented 6 years ago

An error occurred while installing eventmachine (1.0.9.1), and Bundler cannot continue. Make sure that gem install eventmachine -v '1.0.9.1' succeeds before bundling.

Nicholasjaar commented 6 years ago

:)

Nicholasjaar commented 6 years ago

2018-04-01-195932_1280x1024_scrot

Nicholasjaar commented 6 years ago

woaahhh !! sığır kalktı :D

bcoles commented 6 years ago

This issue should now be resolved. Closing.