FS#63496 - [metasploit] msfdb does not work

Attached to Project: Community Packages
Opened by Daniel Zhou (dancju) - Sunday, 18 August 2019, 14:55 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:00 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
kpcyrd (kpcyrd)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

`msfdb` does not work. Possible reasons are:

1. non-root users are not permitted to create `/run/postgresql/.s.PGSQL.5432`.
1. `documentation/` direction is purged which is required to launch web ui.

Steps to reproduce:

```
cd /opt/metasploit
./msfdb init
```
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:00 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/metasploit/issues/1
Comment by Francis (francisuk1989) - Monday, 10 February 2020, 21:44 GMT
As of 5.0.73-1 i can confirm msfdb init works but have to call msfconsole first followed by msfdb init
Comment by Alexandre ZANNI (noraj) - Sunday, 30 August 2020, 17:11 GMT
Is it also normal that MSF 5 is trying to write under ~/.msf4/db/ and not ~/.msf5/db/ ?
Comment by Toolybird (Toolybird) - Friday, 28 April 2023, 06:45 GMT
This look a bit old and stale. Is it still an issue these days?
Comment by Alexandre ZANNI (noraj) - Saturday, 29 April 2023, 09:55 GMT
Outside msfconsole:

➜ cd /opt/metasploit
➜ ./msfdb init
<internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- rex/socket (LoadError)
from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from ./msfdb:10:in `<main>'

Inside msfconsole:

➜ sudo systemctl start postgresql.service
➜ msfconsole
msf6 > msfdb init
[*] exec: msfdb init

Overriding user environment variable 'OPENSSL_CONF' to enable legacy functions.
[?] Would you like to init the webservice? (Not Required) [no]:
Clearing http web data service credentials in msfconsole
Running the 'init' command for the database:
Existing database found, attempting to start it
Starting database at /home/noraj/.msf4/db...failed



➜ msfconsole --version
Framework Version: 6.3.12-dev
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...