ping sweeper

1
2
3
4
5
6
7
8
9
┌──(penguin㉿kali)-[~/Documents]
└─$ cat ip.txt | grep "64 bytes"

64 bytes from 192.168.227.1: icmp_seq=1 ttl=128 time=0.327 ms

┌──(penguin㉿kali)-[~/Documents]
└─$ cat ip.txt | grep "64 bytes"| cut -d " " -f 4 | tr -d ":"
192.168.227.1

ipsweep.sh

1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash    声明bash脚本

if [ "$1" == "" ]
then
echo "Forget an IP Address"
echo "Syntax ./ipsweep.sh 192.168.227"

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

自动化

1
2
3
 ./ipsweep.sh 192.168.227 >ips.txt

for ip in (cat ips.txt) ; do nmap $ip ; done

ping sweeper
https://128374.xyz/2026/04/08/笔记/ping sweeper/
作者
KingPenguinMan
发布于
2026年4月8日
更新于
2026年4月8日
许可协议