Pages: [1] 2 3   Go Down
Print
Author Topic: msfconsole error  (Read 18658 times)
weVeg
Hero Member
*****
Posts: 737


View Profile
« on: November 15, 2012, 10:12:41 PM »

Just runned msfupdate, at startup I've this error:
Quote
noyse@dogbox:~$ sudo msfconsole
/opt/backbox/msf/lib/fastlib.rb:371:in `fastlib_original_require': no such file to load -- rubygems (LoadError)
   from /opt/backbox/msf/lib/fastlib.rb:371:in `require'
   from /opt/backbox/msf/lib/packetfu/packetfu.rb:12
   from /opt/backbox/msf/lib/fastlib.rb:371:in `fastlib_original_require'
   from /opt/backbox/msf/lib/fastlib.rb:371:in `require'
   from /opt/backbox/msf/lib/packetfu.rb:4
   from /opt/backbox/msf/lib/fastlib.rb:371:in `fastlib_original_require'
   from /opt/backbox/msf/lib/fastlib.rb:371:in `require'
   from /opt/backbox/msf/lib/msf/core/db.rb:28
   from /opt/backbox/msf/lib/fastlib.rb:371:in `fastlib_original_require'
   from /opt/backbox/msf/lib/fastlib.rb:371:in `require'
   from /opt/backbox/msf/lib/msf/core/db_manager.rb:5
   from /opt/backbox/msf/lib/fastlib.rb:371:in `fastlib_original_require'
   from /opt/backbox/msf/lib/fastlib.rb:371:in `require'
   from /opt/backbox/msf/lib/msf/core/framework.rb:69
   from /opt/backbox/msf/lib/fastlib.rb:371:in `fastlib_original_require'
   from /opt/backbox/msf/lib/fastlib.rb:371:in `require'
   from /opt/backbox/msf/lib/msf/core.rb:34
   from /opt/backbox/msf/lib/fastlib.rb:371:in `fastlib_original_require'
   from /opt/backbox/msf/lib/fastlib.rb:371:in `require'
   from /opt/backbox/msf/lib/msf/ui/console/driver.rb:2
   from /opt/backbox/msf/lib/fastlib.rb:371:in `fastlib_original_require'
   from /opt/backbox/msf/lib/fastlib.rb:371:in `require'
   from /opt/backbox/msf/lib/msf/ui/console.rb:11
   from /opt/backbox/msf/lib/fastlib.rb:371:in `fastlib_original_require'
   from /opt/backbox/msf/lib/fastlib.rb:371:in `require'
   from /opt/backbox/msf/lib/msf/ui.rb:11
   from /opt/backbox/msf/lib/fastlib.rb:371:in `fastlib_original_require'
   from /opt/backbox/msf/lib/fastlib.rb:371:in `require'
   from /usr/bin/msfconsole:136
Searching on google http://tinyurl.com/d5ulkpr
i've found only about installation on ipad or other f***ng smartphone, problem seems to be fastlib that is lost.
My bbox is up to date, and msf is "Aggiornato alla revisione 16070."
I've also tried to update rubygem with:
Code:
gem install rubygems-update
gem update
but nothing change, any idea guyz?
perhaps I can't see the solutions??
I've forget some useful info??
Logged

una voce libera è sempre liberatrice
under_r00t
ZEROF
Hero Member
*****
Posts: 1177


View Profile WWW
« Reply #1 on: November 15, 2012, 10:42:21 PM »

Hi bro,

Try to install : gem install rubyzip

If this don't help, try SVN update :

cd /opt/backbox/msf
svn update


Sometimes after updates metasploit give errors, and if you run update few hours after,  problems stop. It's all about MSF repo, they make a lot of updates, but they don't test or explain them to free users.
« Last Edit: November 15, 2012, 10:57:56 PM by ZEROF » Logged


Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*
weVeg
Hero Member
*****
Posts: 737


View Profile
« Reply #2 on: November 15, 2012, 10:56:31 PM »

Hi bro! Thanks for the reply!
I've tried your suggestion but nothing to do...
btw, thanks again!
=)
Logged

una voce libera è sempre liberatrice
under_r00t
ZEROF
Hero Member
*****
Posts: 1177


View Profile WWW
« Reply #3 on: November 15, 2012, 10:58:02 PM »

I have just update MSF from terminal with msfupdate i don't have errors !

 _                                                      _
/  \  / \        __                          _   __    /_/ __
| |\ /  | _____  \ \            ___   _____ | | /   \  _   \ \
| | \/| | | ___\ |- -|   /\    / __\ | -__/ | | | |  || | |- -|
|_|   | | | _|__  | |_  / -\ __\ \   | |    | |_ \__/ | |  | |_
      |/  |____/  \___\/ /\  \___/   \/      \__|     |_\  \___\


       =[ metasploit v4.5.0-dev [core:4.5 api:1.0]
+ -- --=[ 984 exploits - 532 auxiliary - 162 post
+ -- --=[ 262 payloads - 28 encoders - 8 nops
       =[ svn r16070 updated today (2012.11.14)

And, try to install ruby 1.9.1 :

sudo apt-get install ruby1.9.1
« Last Edit: November 15, 2012, 11:00:05 PM by ZEROF » Logged


Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*
weVeg
Hero Member
*****
Posts: 737


View Profile
« Reply #4 on: November 15, 2012, 11:09:40 PM »

Quote
ruby1.9.1 è già alla versione più recente.
yesterday msf was ok!!
Logged

una voce libera è sempre liberatrice
under_r00t
ZEROF
Hero Member
*****
Posts: 1177


View Profile WWW
« Reply #5 on: November 15, 2012, 11:15:11 PM »

I see now, i made update right now after 24 days Smiley, but theire repo version was update 14.11.2012, not sure why your system don't load. When this happen to me i check modules files and if some gem is not installed that can make problem, but don't worry bro, next update will fix your issue Smiley, hope that you can wait.
Logged


Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*
weVeg
Hero Member
*****
Posts: 737


View Profile
« Reply #6 on: November 15, 2012, 11:25:03 PM »

Ok bro! no problem! I can wait!
Thank you again for quickly reply!
I'll pay you some beers Wink
Good night!
Logged

una voce libera è sempre liberatrice
under_r00t
r083rt
Guest
« Reply #7 on: November 16, 2012, 12:05:21 AM »

Code:
sudo apt-get -y install ruby1.9.1
sudo apt-get -y install ruby1.9.1-dev
sudo gem install rubygems-update
sudo gem update


again i don't know what backbox is running  im guessing 1.9.3  make sure you using the right ruby-rvm 1.9.3 is faster and more affective or should i say efficient at loading the modules faster  

Metasploit do let modules out sometimes with some import errors and have many a time had to fix them within the modules

but in this case that was'nt the issue !!!!

AND while I'm on the point !! if you having an issue with a certain gem remember while it will install the latest gem by the above You may also have an early version that will cause a conflict
 
example :
Code:
sudo gem install nokigiri --version "number"

Code:
sudo gem uninstall nokigiri

this will then ask .. if there is two installed  do you want to remove x or x & y { versions } .. example !! then you can remove both then  and use the below to update to the latest  

Code:
sudo gem install nokigiri
to install the latest


and etc etc blah blah gem dep etc etc and look up man gem etc .. search for whats in the gems database etc etc ..ok im getting bored listening to my self now !!!

I might as well finish what I started

so if you need to get lets say a version that is the latest or whatver

Code:
sudo gem search --remote nokigiri | sort -n | tail -1

etc etc you can use grep , awk ,sed what ever you like or makes you happy  Grin



But if you have an issue post and the guys will help !!!!

« Last Edit: November 16, 2012, 12:59:00 AM by r083rt » Logged
ostendali
Global Moderator
Sr. Member
*****
Posts: 488


View Profile
« Reply #8 on: November 16, 2012, 12:05:16 PM »

can you post here the lines 370-393 of /opt/backbox/msf/lib/fastlib.rb and also an ls -l on this file pls?
Logged
r083rt
Guest
« Reply #9 on: November 16, 2012, 03:51:01 PM »

hey ostendali

Code:
sed '371,391!d' /opt/backbox/msf/lib/fastlib.rb > $HOME/fastlib.txt

if its a faulty gem in metasploit or corrupt just remove the folder and do msfupdate .. remove the gem or folder
removing the folder will replace the folder all the files in that folder

Code:
sudo rm -rf  /opt/backbox/msf/lib/fastlib.rb

if it persists !! then check out that gem or the module that is giving problems

As Far as i can see he has weVeg has got it sorted
« Last Edit: November 16, 2012, 11:23:31 PM by r083rt » Logged
weVeg
Hero Member
*****
Posts: 737


View Profile
« Reply #10 on: November 16, 2012, 05:26:31 PM »

Sorry for delay guys!!
So, this is the paste, I've pasted 357-398
http://pastebin.com/PsWhJvkB
and:
-rwxr-xr-x 1 root root 10403 nov 15 21:32 /opt/backbox/msf/lib/fastlib.rb

I can't understand the last robert's reply... Sorry bros but till yesterday's update msf worked fine, so, imho, there is a oversight on msf code

Logged

una voce libera è sempre liberatrice
under_r00t
ostendali
Global Moderator
Sr. Member
*****
Posts: 488


View Profile
« Reply #11 on: November 16, 2012, 05:34:36 PM »

Sorry for delay guys!!
So, this is the paste, I've pasted 357-398
http://pastebin.com/PsWhJvkB
and:
-rwxr-xr-x 1 root root 10403 nov 15 21:32 /opt/backbox/msf/lib/fastlib.rb

I can't understand the last robert's reply... Sorry bros but till yesterday's update msf worked fine, so, imho, there is a oversight on msf code


As you can see yourself the fastlib.rb has been modified yesterday.......
so, follow the r083rt suggestion by removing the library dir and do an update...

Probably something went wrong when you have updated and the library corrupted...
Logged
weVeg
Hero Member
*****
Posts: 737


View Profile
« Reply #12 on: November 16, 2012, 05:36:17 PM »

ok i'll try!!
Thank you a lot!!!

EDIT:
removed the folder, and while updating for the first time:
Quote
svn: REPORT di '/svn/!svn/vcc/default': Impossibile leggere il corpo della risposta: Connessione sicura terminata (https://www.metasploit.com)

second time:
Quote
svn: access to '/svn/framework3/branches' forbidden
I'm not very lucky in this day :/
« Last Edit: November 16, 2012, 09:04:35 PM by weVeg » Logged

una voce libera è sempre liberatrice
under_r00t
r083rt
Guest
« Reply #13 on: November 16, 2012, 09:05:43 PM »

thanks zerof and ostendali for you input excellent stuff and taking the time to search the database on the fastlib import updates !!!

weVeg if you have problems with Metasploit these are the first things you do

1 ) remove that folder what lists the gem or modules and do an msfupdate
2 ) if it persists i.e like an import error i.e the devs appended the file or either upgraded and it conflicts with another module
     then either ..fix it your self by looking at the problem i.e output error TRACE THE FILE AND IMPORTS and examine the file
     OR if you cant figure the problem out look up the latest version and compare it to yours ..


sometimes its a case of fix it yourself as when theres a problems the devs don't catch it quick enough or get delayed on it
My experience in the pass was never to wait for the devs as sometimes it was taking too long so I always fixed it myself

once again thanks ZeroF and ostendali .. quick response and perfect input ... as usual nothing strange
  Wink

sorry weVeg  IF the post was hard to understand   Grin THE FORMAT was not as clean as it should have been My fault Not yours
« Last Edit: November 16, 2012, 09:12:38 PM by r083rt » Logged
r083rt
Guest
« Reply #14 on: November 17, 2012, 12:27:21 AM »

Im in the middle of getting a full svn refresh from source if can wait ill zip the lib folder and upload it for you

if you want a pacific  folder or file do this

Code:
svn checkout https://www.metasploit.com/svn/framework3/trunk msf --depth empty
cd msf
svn filename or folder
### then just move the file or folder you svn'ed and move it to the location i.e /opt/backbox/msf/ etc etc


ok I uploaded the files for you ..from a fresh svn source
!!

here is the fastlib file  fastlib.rb link removed by r083rt
here is the lib folder lib folder link removed by r083rt

Code:
cd Downloads
tar -xf lib.tar.gz
sudo rm -rf /opt/backbox/msf/lib
sudo mv  lib /opt/backbox/msf



svn is very slow the project would be better moving to git .. git is better in many ways


« Last Edit: November 17, 2012, 03:49:46 AM by r083rt » Logged
Pages: [1] 2 3   Go Up
Print
Jump to: