Metasploit is a computer security project that explores to exploit the system security vulnerabilities/weaknesses of computer and its networks.
Metasploit is hardly run on windows OS.
This post is for you if you wish running metasploit framework on windows os
INTRO
Intro
Installing metasploit-framework on windows
Downloading and installing PostgreSQL
Firstly download the PostgreSQL from here https://www.enterprisedb.com/products-services-training/pgdownload
During the installation of PostgreSQL when it request for Password Please type “1” only

Downloading and installing the Metasploit framework
Secondly download the metasploit-framework from here https://windows.metasploit.com/metasploitframework-latest.msi and Install it properly as you follow the instructions showed on you installation window.
Now that you have installed both the PostgreSQL and Metasploit-framework now let’s run the both program
RUNNING THE INSTALLED APPLICATION: METASPLOIT-FRAMEWORK
Running Metasploit-framework on windows using cmd
We are going to open metaspoit-framework console from cmd

RUNNING THE INSTALLED APPLICATION: POSTGRESQL
Running PostgreSQL on windows Using SQL shell
Go to your start menu and locate the SQL shell type the below but type only “1” for the password which you gave to the PostgreSQL as I instructed you during its installation.

SOLUTION TO DATABASE NOT SUPPORTED : DATABASE YAML FILE MISSING
Problem while running the Metasploit-framework
Normal you are bound to witness this issue “No database support: No database YAML file”

[SOLVED] No database support: No database YAML file WHILE running the metasploit-framework
Solutions
1. Find the config directory for the metasploit-framework
2. Notice you have database.yml.example

3. Open the “database.yml.example” in a text editor / source code editor

4. Resave it as “database.yml” and REPLACE in the parameters contained in the content with the below ones

development: &pgsql adapter: postgresql database: msfdb username: postgres password: 1 host: localhost port: 5432 pool: 200 timeout: 5
test: <<: *pgsql database: msfdb username: postgres password: 1
Notice:
During your PostgreSQL installation your password was “1” and default username was “postgres” , default host was localhost “127.0.0.1” with default port listening to “5432”
But the database “msfdb” as I defined it have not been created, therefore I have to create msfdb database in SQL shell as shown below:
5. Type the below codes in the SQL shell which is already open

Type the below code:
To create database with the name msfdb -:
CREATE DATABASE msfdb
To check if the database have been created -:
\l
To connect to the database -:
\c msfdb
Once you are done you are now connected to database
Let’s move on:
6. Now close metasploit-framework console in cmd

Type “quit” press enter key then type “exit” and press enter the msfconsole will automatically close. Basically that’s how to exit msfconsole of metasploit-framework using cmd.
Now reopen the metasploit-framework as described in RUNNING THE INSTALLED APPLICATION: METASPLOIT-FRAMEWORK [Running Metasploit-framework on windows using cmd]
Now notice that the metasploit-framework console (msfconsole.bat) no longer displays this error No database support: No database YAML file
The metasploit-framework now works well since it have stopped displaying the error [No database support: No database YAML file
].
See the below

Type the codes below to check if the database is connected
db_status

The metasploit-framework now have “msfdb connected with connection type being postgresql”
Don’t forget to share this post – if you like it
Next >> we will be discussing how to connect the Kage GUI of