> For the complete documentation index, see [llms.txt](https://security.navidnaf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://security.navidnaf.com/ollivanders/metasploit-framework/imports.md).

# Imports

## nmap

**Step 1: Run Nmap to Save Results**

```
nmap -Pn -sV -O -oX nmap-msf.xml demo.ine.local
```

**Step 2: Start Metasploit Famework & Create a Workspace (Optional)**

<pre class="language-bash"><code class="lang-bash"># Start Postgres
service postgresql start

# Start Metasploit
<strong>msfconsole
</strong>db_status

# When db_status says [*] postgresql selected, no connection
msfdb delete
msfdb init
cp /usr/share/metasploit-framework/config/database.yml /root/.msf6
service postgresql start
msfconsole
db_status

# Workspace
workspace
workspace -a name_of_workspace
</code></pre>

**Step 3: Import Nmap Result**

```bash
db_import nmap-msf.xml
```

**Step 4: View Hosts & Services**

```bash
hosts
services
```

**Step 5: Run nmap directly from MSF**

```bash
db_nmap -Pn -sS -O -p- [IP]
```

## Nessus

**Step 1: Export the scan results as a `.nessus` file (XML format).**

**Step 2: Import nessus results**

```bash
msfconsole -q
workspace -a msf-nessus
db_import /path/to/nessus.nessus
```

**Step 3: View Hosts & Services**

```bash
hosts
services
```

**Step 4: View Vulnerabilities & Search CVEs**

```bash
vulns
vulns -p [port]
search cve:[year] name:[name]
```
