> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/pt-br/reconnaissance/network-manual-scan.md).

# Varredura manual de rede

{% hint style="info" %}
Este documento detalha técnicas manuais de varredura de rede sem ferramentas automatizadas como o Nmap. Você aprenderá a usar comandos simples e eficazes (como `/dev/tcp`, `ping`, `netcat`, etc.) para identificar hosts ativos, verificar portas abertas e diagnosticar serviços em uma rede. Ideal para entender o básico dos diagnósticos de rede e personalizar suas análises de acordo com suas necessidades.
{% endhint %}

## Porta específica (HTTP - porta 80)

```bash
echo '' > /dev/tcp/192.168.1.1/80 && echo "[+] HTTP Aberta" || echo "[-] HTTP Fechada"
```

## Várias portas (SSH, HTTP, HTTPS)

Um comando simples para testar uma lista de portas:

```bash
for port in 22 80 443; do
  echo '' > /dev/tcp/192.168.1.1/$port && echo "[+] Porta $port Aberta" || echo "[-] Porta $port Fechada"
done
```

## Lista de IPs e Porta Única

Para verificar se uma porta específica (por exemplo, 22) está aberta em vários IPs:

```bash
for ip in 192.168.1.1 192.168.1.2 192.168.1.3; do
  echo '' > /dev/tcp/$ip/22 && echo "[+] SSH Aberto em $ip" || echo "[-] SSH Fechado em $ip"
done
```

## Loop para varrer um intervalo de portas

Para varrer as portas de uma máquina em um intervalo específico:

```bash
for port in {20..30}; do
  echo '' > /dev/tcp/192.168.1.1/$port && echo "[+] Porta $port Aberta" || echo "[-] Porta $port Fechada"
done
```

## Serviço em vários IPs e portas

Para testar um conjunto de IPs e várias portas:

```bash
for ip in 192.168.1.1 192.168.1.2; do
  for port in 80 443 8080; do
    echo '' > /dev/tcp/$ip/$port && echo "[+] $ip:$port Aberta" || echo "[-] $ip:$port Fechada"
  done
done
```

## Script avançado para diagnosticar uma rede

Crie um pequeno script para varrer portas em um alvo e salvar os resultados em um arquivo:

```bash
#!/bin/bash

target="192.168.1.1"
output="scan_results.txt"

echo "Varredura de $target..." > $output
for port in {1..1024}; do
  if echo '' > /dev/tcp/$target/$port 2>/dev/null; then
    echo "[+] Porta $port Aberta" | tee -a $output
  else
    echo "[-] Porta $port Fechada" >> $output
  fi
done
echo "Varredura concluída. Resultados salvos em $output."
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/pt-br/reconnaissance/network-manual-scan.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
