Scan the IP addresses of your network with the shell

 


 

scan IP addresses connected in a network

you can download using this command on your terminal:

git clone https://github.com/mugirawa/ip-scan-with-shell.git

and to run it do this ./ipscan.sh 192.168.1"

but before make a chmod to give it the right

 

 

 

#!/bin/bash
if [ "$1" == "" ]
then
echo "You forgot an IP address!"
echo "Syntax: ./ipscan.sh 192.168.1"

else
for ip in `seq 1 254`; do
ping -c 1 $1.$ip | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" &
done
fi

Aucun commentaire:

Enregistrer un commentaire

Pages