# Port Scanning Under the hood

When we hear Port Scanning the first tool that comes in our mind is Nmap.&#x20;

well how does  Nmap pulls off  such task ?!  ,basically "WHAT HAPPENS UNDER THE HOOD ?"

* What is Nmap?

Nmap stands for **Network Mapper** which is a free Open source command-line too&#x6C;**.** Nmap is an information-gathering tool used for recon reconnaissance. It scans hosts and services on a computer network which means that it sends packets and analyzes the response. Listed below are the most useful Scans which you can run with the help of Nmap tools.

* Basic Syntax

> nmap \[Scan Type] \[Options] {Target}

<pre><code><strong>nmap -sT 192.168.1.12 --top-ports 50
</strong></code></pre>

**Here:**

* **-sT** is used for TCP Scan.
* **--top-ports** is used to give top ports which are used to give the number of ports. Here we give 50 which means the top 50 ports which are most used in TCP.
* **192.168.1.12** is the Destination IP. You can also give the Destination URL.

&#x20;
