# TCP/UDP

Nmap is a popular choice for a port scan and for good reason, Nmap has tons of options and is capable of much more than just a port scan.

{% tabs %}
{% tab title="Unix" %}
The goal will be to scan/test the hosted applications/services:

```python
# Basic scan of the first 1000 TCP ports
nmap -sS -n --open 10.10.10.0/24

# More intense scanning of open ports
nmap -sT -Pn -n --open 10.10.10.0/24 -sV -p 42,53,80,88,135,139,389,443,445,464,593,636,1512,3306,3268,3269,3389,8080,8889
```

{% endtab %}

{% tab title="Windows" %}
The nmap tool also exists for windows [here](https://nmap.org/book/inst-windows.html).

```python
# Basic scan of the first 1000 TCP ports
nmap -sS -n --open 10.10.10.0/24

# More intense scanning of open ports
nmap -sT -Pn -n --open 10.10.10.0/24 -sV -p 42,53,80,88,135,139,389,443,445,464,593,636,1512,3306,3268,3269,3389,8080,8888
```

It is also possible to use PowerShell to scan ports:

```powershell
$ip='localhost'
for($i=0; $i -le 65445; $i++){
    Test-NetConnection $ip -Port $i -InformationLevel 'Detailed'
}
```

{% endtab %}
{% endtabs %}

You can refer to the [Services ](https://blog.hacktive.bebzounette.com/services)part.
