I was experience the exactly some problem with metasploit installed in my ubuntu 11.04 x86 on my netbook. Still have no idea whats going wrong here...
When i run msfconsole directly from my home directory, which run /usr/local/bin/msfconsole everything goes fine except i can't use several standard shell command like 'clear', msf always replay with an error indicating unrecognized the command. This problem not occur when i run msfconsole from /opt/framework/msf3 directory.
the only different is at the first msfconsole there is more path in $PATH, but i think as long as /usr/bin there, command clear should work.Code:root@bt:~# which clear /usr/bin/clear root@bt:~# msfconsole ## ### ## ## ## ## #### ###### #### ##### ##### ## #### ###### ####### ## ## ## ## ## ## ## ## ## ## ### ## ####### ###### ## ##### #### ## ## ## ## ## ## ## ## # ## ## ## ## ## ## ##### ## ## ## ## ## ## ## #### ### ##### ##### ## #### #### #### ### ## =[ metasploit v3.8.0-dev [core:3.8 api:1.0] + -- --=[ 698 exploits - 358 auxiliary - 54 post + -- --=[ 224 payloads - 27 encoders - 8 nops =[ svn r12977 updated today (2011.06.20) msf > clear[*] exec: clear 'xterm': unknown terminal type. msf > echo $PATH[*] exec: echo $PATH /opt/framework3/java/bin:/opt/framework3/ruby/bin:/opt/framework3/postgresql/bin:/opt/framework3/bin:/opt/framework3/common/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/etc/alternatives/gem-bin msf > /usr/bin/clear[*] exec: /usr/bin/clear ======> It's work! msf > quit root@bt:~# /opt/framework3/msf3/msfconsole _ _ _ _ | | | | (_) | _ __ ___ ___| |_ __ _ ___ _ __ | | ___ _| |_ | '_ ` _ \ / _ \ __/ _` / __| '_ \| |/ _ \| | __| | | | | | | __/ || (_| \__ \ |_) | | (_) | | |_ |_| |_| |_|\___|\__\__,_|___/ .__/|_|\___/|_|\__| | | |_| =[ metasploit v3.8.0-dev [core:3.8 api:1.0] + -- --=[ 698 exploits - 358 auxiliary - 54 post + -- --=[ 224 payloads - 27 encoders - 8 nops =[ svn r12977 updated today (2011.06.20) msf > echo $PATH[*] exec: echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/etc/alternatives/gem-bin msf > clear[*] exec: clear ======> It's work to! msf > quit root@bt:~#
So, where is exactly the problem is?
Thx in advance.
I was experience the exactly some problem with metasploit installed in my ubuntu 11.04 x86 on my netbook. Still have no idea whats going wrong here...
Yes, I also have this same issue (running BT5 on 32-bit gnome). Thus far, it hasn't been a big problem for me, so I've just been ignoring it. I did a global find on clear, and located 2: /usr/bin/clear, and /opt/framework3/bin/clear. When I start msfconsole from the menu, it runs the following: sh -c "msfconsole;sudo -s". I think that how metasploit is started determines how/if shell commands work inside msfconsole.
If I could figure out how to scuba dive & hack at the same time, there would be nothing I couldn't do...
A quick follow up...just ran /opt/framework3/bin/clear from a command prompt, and got the message "xterm: unknown terminal type". I think what's happening is a path issue; /opt/framework3/bin/clear is being run, rather that /usr/bin/clear.
You could probably fix this by renaming /opt/framework3/bin/clear. Then, run clear inside of msfconsole, and see what happens
If I could figure out how to scuba dive & hack at the same time, there would be nothing I couldn't do...
rm /opt/framework/bin/clear
ln -s /usr/bin/clear /opt/framework/bin/clear
open source = open minds, human knowledge belongs to the world
or you could just do rm /opt/framework/bin/clear and then forget about the symlink and msfconsole will find clear all on its own