- Modify the prefix variable as necessary, and paste into terminal
- Copy and Paste the rest of the following script into the terminal application
prefix="192.168.0."
for i in {1..100}
do
ping -c1 -W1 -i0.2 $prefix$i > /dev/null
if [ $? -eq 0 ]
then
echo $prefix$i
nc -w 1 -vz $prefix$i 1-1056 2>&1 | grep succeeded
fi
done
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.