Results 1 to 7 of 7

Thread: BackTrack 5 cannot connect to msfconsole after updating

  1. #1
    Just burned their ISO
    Join Date
    Dec 2012
    Posts
    3

    Default BackTrack 5 cannot connect to msfconsole after updating

    i recently downloaded BT5 from the website and installled it on a vertiual machine. once installation is finished i tried to update everything using the setps below

    #apt-get update && apt-get upgrade

    After that i tried to updating Metasploit by uninstalling and then reinstalled it, guessing that this would installed latested Metasploit, like below

    #cd /opt/framework3
    /opt/framework3#./uninstall
    /opt/framework3#apt-get install metasploit

    Then i tried to connecting to msfconsole , but it gave me an error asshown below

    #msfconsole

    shell-init:error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    shell-init:error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    shell-init:error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    /opt/metasploit/msf3/lib/fastlib.rb:362:in 'pwd' : No such file or directory - getcwd (errno: : ENOENT)
    from /opt/metasploit/msf3/lib/fastlib.rb:362: in '<mudle:Kernel>'
    from /opt/metasploit/msf3/lib/fastlib.rb:355: in '<top (required)>'
    from /opt/metasploit/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36: in 'require'
    from /opt/metasploit/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36: in 'require'
    from /opt/metasploit/msf3/msfconsole:18: in '<main>'

    can anyone help or can anyone tell me how to update metasploit on BT5, if im doing it wrongly.

    Thanks

  2. #2
    Administrator sickness's Avatar
    Join Date
    Jan 2010
    Location
    Behind the screen.
    Posts
    2,921

    Default Re: BackTrack 5 cannot connect to msfconsole after updating

    Try purging it using apt-get than reinstalling.
    Back|track giving machine guns to monkeys since 2007 !

    Do not read the Wiki, most your questions will not be answered there !
    Do not take a look at the: Forum Rules !

  3. #3
    Just burned their ISO
    Join Date
    Dec 2012
    Posts
    3

    Default Re: BackTrack 5 cannot connect to msfconsole after updating

    Quote Originally Posted by sickness View Post
    Try purging it using apt-get than reinstalling.
    Do u mean to run fellowing commands accordingly

    # apt-get purge framework3

    To install the updated version,
    #apt-get update && apt-get install framework3

    whats the difference doing ./uninstall and purge framework3?

  4. #4
    Administrator sickness's Avatar
    Join Date
    Jan 2010
    Location
    Behind the screen.
    Posts
    2,921

    Default Re: BackTrack 5 cannot connect to msfconsole after updating

    I was thinking maybe purge than git clone the latest release and try that out.
    Back|track giving machine guns to monkeys since 2007 !

    Do not read the Wiki, most your questions will not be answered there !
    Do not take a look at the: Forum Rules !

  5. #5
    Senior Member VulpiArgenti's Avatar
    Join Date
    Sep 2011
    Location
    lost
    Posts
    174

    Default Re: BackTrack 5 cannot connect to msfconsole after updating

    can anyone help or can anyone tell me how to update metasploit on BT5, if im doing it wrongly.
    I think this was where you went wrong: "/opt/framework3#./uninstall". You don't ever need to uninstall, unless it's broken (which it now is for you ).

    The current version of the framework is 4.x, not 3. It's path is /opt/metasploit/msf3, not /opt/framework3.

    I would suggest purging/deleting every reference to metasploit you can find, whatever version, then "apt-get install metasploit". May be easier just to re-install BT5R3.

    Once you have an intact version of metasploit, update simply by "msfupdate" from the BT menu, or from the msfconsole command-line.

  6. #6
    Just burned their ISO
    Join Date
    Dec 2012
    Posts
    3

    Default Re: BackTrack 5 cannot connect to msfconsole after updating

    Quote Originally Posted by VulpiArgenti View Post
    I think this was where you went wrong: "/opt/framework3#./uninstall". You don't ever need to uninstall, unless it's broken (which it now is for you ).

    The current version of the framework is 4.x, not 3. It's path is /opt/metasploit/msf3, not /opt/framework3.

    I would suggest purging/deleting every reference to metasploit you can find, whatever version, then "apt-get install metasploit". May be easier just to re-install BT5R3.

    Once you have an intact version of metasploit, update simply by "msfupdate" from the BT menu, or from the msfconsole command-line.
    I did what as sickness told me to do..and it works..now i can connect to msfconsole and it got updated, version is v4.0.0 now. But there is another issue now. I want to connect to mysql db. When i try db_driver under msfconsole i only get postgresql driver available. And there is another message that says " Enable the mysql driver with the following command: $gem install mysql and also to intall libmysqlclient-dev" I did both but still same thing happens, only postgresql is available and same message displayed.

    Any help?

  7. #7

    Default Re: BackTrack 5 cannot connect to msfconsole after updating

    In the same thread line I'm encountering another issue when I'm trying to install it from apt-get :

    "
    apt-get install metasploit
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
    metasploit
    0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
    Need to get 277MB of archives.
    After this operation, 0B of additional disk space will be used.
    Get:1 http://64.repository.backtrack-linux.org/ revolution/testing metasploit 4.4.0-bt2 [277MB]
    Get:2 http://64.repository.backtrack-linux.org/ revolution/testing metasploit 4.4.0-bt2 [277MB]
    Fetched 276MB in 3s (79.3MB/s)
    Failed to fetch http://64.repository.backtrack-linux...-bt2_amd64.deb Hash Sum mismatch
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    "


    Firstly I've done:

    1. apt-get purge metasploit

    2. apt-get update --fix-missing

    However, the issue still shows as I've described earlier.

    Any thoughts?

    Thanks much....

Similar Threads

  1. Error while updating BackTrack 5 R3
    By commanderx in forum BackTrack 5 Beginners Section
    Replies: 7
    Last Post: 02-07-2013, 04:25 PM
  2. Fast-track can not connect to database after updating
    By nedgb in forum Beginners Forum
    Replies: 10
    Last Post: 03-25-2011, 12:15 PM
  3. Updating tools on backtrack 4 R2
    By SolidSnake in forum Beginners Forum
    Replies: 0
    Last Post: 01-05-2011, 02:06 PM
  4. Question regarding updating BackTrack to 2.6.34
    By Grayw0lv in forum Beginners Forum
    Replies: 4
    Last Post: 07-18-2010, 02:43 PM
  5. Fresh Backtrack 3 hdd install - updating
    By elight in forum OLD Newbie Area
    Replies: 2
    Last Post: 12-24-2008, 01:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •