After installing metasploit from here https://wiki.termux.com/wiki/Metasploit_Framework . I got this error:
$ msfconsole
/data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:377:in parse': (/data/data/com.termux/files/home/metasploit-framework/config/database.yml): mapping values are not allowed in this context at line 9 column 25 (Psych::SyntaxError)
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:377:inparse_stream'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:325:in parse'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:252:inload'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:473:in block in load_file'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:472:inopen'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:472:in load_file'
from /data/data/com.termux/files/home/metasploit-framework/lib/msf/ui/console/driver.rb:179:ininitialize'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in new'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:62:indriver'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in start'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/base.rb:82:instart'
from /data/data/com.termux/files/usr/bin/msfconsole:48:in `
Got the same thing
Any fix yet
No, not yet
Your configuration file is broken
Can you be more specific?
No I can't. I'm just reading what your error says.
Got the same error
Mine is fixed just ran setup again
What do you mean by ran setup
Have you used the installation script or the manual installation?
The installation script
Okay, imma see what's wrong with the script..
Manual
I used this link for the download https://raw.githubusercontent.com/1Tech-X/Metasploit-/master/metasploit.sh
Curl - LO link
@AD4M420 Don't use 3rd party script, use https://Auxilus.github.io/metasploit.sh
Nothing else would work for me so I resorted to 3rd party script works fine though
Pls in my case nothing helps
./msfconsole
/data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:377:in parse': (/data/data/com.termux/files/home/metasploit-framework/config/database.yml): mapping values are not allowed in this context at line 9 column 25 (Psych::SyntaxError)
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:377:inparse_stream'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:325:in parse'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:252:inload'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:473:in block in load_file'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:472:inopen'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:472:in load_file'
from /data/data/com.termux/files/home/metasploit-framework/lib/msf/ui/console/driver.rb:179:ininitialize'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in new'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:62:indriver'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in start'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/base.rb:82:instart'
from ./msfconsole:48:in `
please help :(
After a fresh reinstall using Auxilus script, I got the same error.
Open an issue in Auxilus' repo then. This should be closed.
sfconsole
/data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:377:in parse': (/data/data/com.termux/files/home/metasploit-framework/config/database.yml): mapping values are not allowed in this context at line 9 column 25 (Psych::SyntaxError)
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:377:inparse_stream'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:325:in parse'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:252:inload'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:473:in block in load_file'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:472:inopen'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:472:in load_file'
from /data/data/com.termux/files/home/metasploit-framework/lib/msf/ui/console/driver.rb:179:ininitialize'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in new'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:62:indriver'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in start'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/base.rb:82:instart'
from /data/data/com.termux/files/usr/bin/msfconsole:48:in `
$
Same error
@7Ragnarok7 can u try to replace database.yml file with this one (download with curl or wget )
curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/database.yml
Still error :(
Dont worry :)
Just remove old one and reinstall with this script ( installed recently with this script)
Download with curl
curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh
Curl command not found :(
apt install curl :)
@Hax4us
So I tried replacing 'database.yml' with yours and it worked (except connection to db failed). But then, when I exited and reran msfconsole. The same error was back again. My question here is; did running msfconsole for the first time edited the 'database.yml' and corrupted it?
Never mind reinstalling using this works https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh
@nizagotov nice ;)
@nizagotov now you can close this issue :)
Can anyone tell me the exact procedure to install metasploit in termux! I am new getting the same erorr after installation
msfconsole isn't working! Help me guys please! I am clearing all the data now!
Just now installed termux! Now tell me what's the exact procedure
Have you tried installing from my repo?
I tried Automatic Installation process from Termux wiki
Can you try installing from my repo and see if it works?
Can I get the link! And procedure
wget https://Auxilus.github.io/auxilus.key
apt-key add auxilus.key
echo "deb [trusted=yes,arch=all] https://Auxilus.github.io/ termux extras" >> $PREFIX/etc/apt/sources.list
pkg update
pkg install metasploit-framework
It isn't working
Same problem
./msfconsole
/data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:377:in parse': (/data/data/com.termux/files/home/metasploit-framework/config/database.yml): mapping values are not allowed in this context at line 9 column 25 (Psych::SyntaxError)
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:377:inparse_stream'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:325:in parse'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:252:inload'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:473:in block in load_file'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:472:inopen'
from /data/data/com.termux/files/usr/lib/ruby/2.4.0/psych.rb:472:in load_file'
from /data/data/com.termux/files/home/metasploit-framework/lib/msf/ui/console/driver.rb:179:ininitialize'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in new'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:62:indriver'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in start'
from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/base.rb:82:instart'
from ./msfconsole:48:in `
Used your Automatic Installation process.
But msfconsole isn't starting up!
Tried this too
wget https://Auxilus.github.io/auxilus.key
apt-key add auxilus.key
echo "deb [trusted=yes,arch=all] https://Auxilus.github.io/ termux extras" >> $PREFIX/etc/apt/sources.list
pkg update
pkg install metasploit-framework
But it isn't working help me devs
I tried this too:
wget https://Auxilus.github.io/auxilus.key
apt-key add auxilus.key
echo "deb [trusted=yes,arch=all] https://Auxilus.github.io/ termux extras" >> $PREFIX/etc/apt/sources.list
pkg update
pkg install metasploit-framework
But have same problem
@mohithchowdary @n113 u can use my script and tell me it works or not ?
For my script plz see old messages of this issue bcz your error was solved already above just look :)
Can you please provide me the procedure! For installing! I tried Auxilus automatic installation process and also tried the above script to solve the issue. But I don't know why it isn't working
Try to change database.yml file with my file (link is given above)
I have already tried it buddy! But it isn't working !
Tried this
Download with curl
curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh
No bro i said database.yml file download and replace with your
Goto metasploit-framework folder then you can see a folder name => config
Then enter into config folder and u can see now database.yml file now u have to delete by rm database.yml and download my file there by
curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/database.yml
Thats it then try msfconsole again
Not working buddy! I tried is there any other way to contact you! Like Facebook,WhatsApp,Instagram ! I'll send you the screenshots
my mail => [email protected]
Whatsapp => 7210500285
Check your WhatsApp?
@Hax4us you are the best!
I tried this way :
Goto metasploit-framework folder then you can see a folder name => config
Then enter into config folder and u can see now database.yml file now u have to delete by rm database.yml and download my file there by
curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/database.yml
Thats it then try msfconsole again
And it works now. I love you man! :)
It isn't working.what to do now ?
I was unable to access victims device
-] Exploit failed: The following options failed to validate: LHOST.
[*] Exploit completed, but no session was created.
msf
@Hax4us After scouring the internet for ours, your solution worked like a charm! Thank you so much! Time for shells!