Git Product home page Git Product logo

Comments (5)

XSecr3t avatar XSecr3t commented on June 25, 2024 3

Hello

I have same troublem

I try setting msfdb from termux wiki but why fail?

Mr.XSecr3t@localhost:/data/data/com.termux/files/usr/var/lib
$ cd $HOME/metasploit-framework/config
Mr.XSecr3t@localhost:/metasploit-framework/config
$ ls
application.rb database.yml.travis
boot.rb database.yml.vagrant
cucumber.yml environment.rb
database.yml environments
database.yml.example
Mr.XSecr3t@localhost:
/metasploit-framework/config
$ initdb $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.

creating 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

Mr.XSecr3t@localhost:/metasploit-framework/config
$ pg_ctl -D /data/data/com.termux/files/usr/var/lib/postgresql -l logfile start
waiting for server to start.... done
server started
Mr.XSecr3t@localhost:
/metasploit-framework/config
$ msfconsole
[-] Failed to connect to the database: FATAL: role "msf" does not exist

db_status
[] postgresql selected, no connection
msf > createuser msf
[
] exec: createuser msf

createuser: could not connect to database postgres: could not connect to server: Connection refused
Is the server running locally and accepting
connections on Unix domain socket "/data/data/com.termux/files/usr/tmp//.s.PGSQL.5432"?
msf >

Is this something wrong?
Thank you if you reply my problems :(

from metasploit-omnibus.

busterb avatar busterb commented on June 25, 2024

edit c:\metasploit-framework\embedded\framework\msfdb

In the 'run_cmd' function, comment out the 'err = stderr.read' and 'out = stdout.read' calls like this:

def run_cmd(cmd)
  exitstatus = 0

  err = out = ""
  Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
    #err = stderr.read
    #out = stdout.read
    exitstatus = wait_thr.value.exitstatus
  end

from metasploit-omnibus.

Maktm avatar Maktm commented on June 25, 2024

Just tested and that fixes it. Thanks.

--

Note: I had to run msfdb reinit to get it to work.

from metasploit-omnibus.

Electrons-Force avatar Electrons-Force commented on June 25, 2024

Me too bro...... I'm facing the same problem

from metasploit-omnibus.

bcook-r7 avatar bcook-r7 commented on June 25, 2024

When tickets are closed, please open a new one rather than commenting on existing ones. Thanks.

from metasploit-omnibus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.