Tanto no servidor quanto cliente dar o comando
apt update
apt install netcat-traditional
Servidor Python como fazer:
ls
mkdir
python3 -m http.server 8080
// deixa aberto funcionando
Cliente
nc -v 192.168.1.10 8080
// testar varias versões
GET / HTTP/1.0
GET / HTTP/1.1
HEAD / HTTP/1.0
HEAD / HTTP/1.1
POST / HTTP/1.0
POST / HTTP/1.1
OPTIONS / HTTP/1.0
OPTIONS / HTTP/1.1
Instalando o serviço NetCat (Servidor) (Caso maquina não esteja configurada)
apt install apache2
ip -br -c a
nano /etc/network/interfaces
allow-hotplug enp0s9
iface enp0s9 inet static
address 192.168.1.10
apt install net-tools
netstat -nltp
systemctl start apache2 // caso precise
Pastinha de Logs (Servidor)
cd /var/log/apache2
tail cat access.log
Cliente NetCat
nc -v 192.168.1.10 80
// testar varias versões
GET / HTTP/1.0
GET / HTTP/1.1
HEAD / HTTP/1.0
HEAD / HTTP/1.1
POST / HTTP/1.0
POST / HTTP/1.1
OPTIONS / HTTP/1.0
OPTIONS / HTTP/1.1
printf "OPTIONS / HTTP/1.0\\r\\n\\r\\n" | nc 192.168.1.10 80
printf "GET / HTTP/1.0\\r\\n\\r\\n" | nc 192.168.1.10 80
printf "GET / HTTP/1.1\\r\\n\\r\\n" | nc 192.168.1.10 80