Monday, March 18, 2013

Solved : Updated Metasploit But Then It Gives An Error


Ok, so I spent a lot of time updating Metaspoit to include the latest modules and stuff using the msfupdate command. It took around 2-3 hours to complete (and I have a fast eth0 connection). Much to my disappointment, it didn't work when tried running it again using 'msfconsole'. This was the output :




 /opt/metasploit/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /opt/metasploit/msf3/lib/msf/util/exe.rb:2: syntax error, unexpected tLSHFT (SyntaxError) <<<<<<< .mine ^ from /opt/metasploit/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /opt/metasploit/msf3/lib/fastlib.rb:374:in `require' from /opt/metasploit/msf3/lib/msf/util.rb:23:in `' 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/lib/fastlib.rb:374:in `require' from /opt/metasploit/msf3/lib/msf/core/framework.rb:3:in `' 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/lib/fastlib.rb:374:in `require' from /opt/metasploit/msf3/lib/msf/core.rb:34:in `' 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/lib/fastlib.rb:374:in `require' from /opt/metasploit/msf3/lib/msf/ui/console/driver.rb:2:in `' 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/lib/fastlib.rb:374:in `require' from /opt/metasploit/msf3/lib/msf/ui/console.rb:11:in `' 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/lib/fastlib.rb:374:in `require' from /opt/metasploit/msf3/lib/msf/ui.rb:11:in `' 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/lib/fastlib.rb:374:in `require' from /opt/metasploit/msf3/msfconsole:156:in `




It totally sucks. Well I found a Solution after a little searching on the Internet. GOTO : 


$ cd /opt/metasploit/msf3/lib/msf/util/ 

THEN REMOVE : 


$ rm exe.rb 

THEN UPDATE MSF AGAIN : 


$ msfupdate 

It worked fine after that :

Trace program: running wake up, Neo... the matrix has you follow the white rabbit. knock, knock, Neo. (`. ,-, ` `. ,;' / `. ,'/ .' `. X /.' .-;--''--.._` ` ( .' / ` , ` ' Q ' , , `._ \ ,.| ' `-.;_' : . ` ; ` ` --,.._; ' ` , ) .' `._ , ' /_ ; ,''-,;' ``- ``-..__``--` http://metasploit.pro =[ metasploit v4.6.0-dev [core:4.6 api:1.0] + -- --=[ 1058 exploits - 596 auxiliary - 174 post + -- --=[ 276 payloads - 29 encoders - 8 nops

msf >

ALTERNATE Solution :

This is working for some people, You can Navigate to the folder where 'msfconsole' binary is located on your system and fire up msf from there.

$ cd /opt/metasploit/apps/pro/msf3 && ls

You should see a binary called 'msfconsole', So this where your msf binaries like 'msfconsole', 'msfupdate' and 'msfcli' are located.

$ msfconsole

This should start Metasploit for you.

BTW, you can download metasploit from the this link

No comments:

Post a Comment