![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
scanport scanne un port ou une plage de port sur un serveur pour savoir si celui-ci est ouvert.
C'est une commande dont on a souvent besoin. Il est écrit en perl. Il utilise le module IO::Socket qui vient en général avec les distributions de perl 'pas sous AIX).
Le port scanné par defaut est 22 (ssh).
scanport ADRESSE_IP
scanport ADRESSE_IP NUMERO PORT
scanport ADRESSE_IP NUMERO PORT_MIN NUMERO_PORT_MAX
Pour connaitre la correspondance port / numéro de port vous pouvez consulter
le fichier /etc/services.
exemples
scan si le port ssh du serveur 192.168.1.10 est ouvert
scanport 192.168.1.10 Port 22 on 192.168.1.10 is open<
scan si le port vnc du serveur 192.168.1.24 est ouvert
scanport 192.168.1.24 5900 Port 192.168.1.24 on 5900 is NOT open
scan l'ordinateur local pour les ports ouverts jusqu'a 1024 scanport 127.0.0.1 1 1024 | grep -v NOT ================================================================ Scanning 127.0.0.1 on ports 1-1024 ================================================================ Port 22 is open Port 80 is open Port 631 is open
Description | date | script |
scan si un port reseau ou un range d'IP est ouvert | 15/02/2022 | scanport |