# for i in 'seq 1 255'; do hping3 --count 1 x.x.x.$i; done [hping_an_address_space]
# for i in 'seq 1 255'; do hping3 --count 1 x.x.x.$i 2>/dev/null | grep ip=; done [list those that repond, grep output for "ip="; taking the standard rror message and throwing them away ]
# hping3 target_IP_address <--
# tcpdump -nn host your_IP_address and host target_IP_address -p -i tap0 <-- (possibly stop iptables on the source linux machine
# hping3 -icmp -data 40 -file text.txt target_IP_address -p -i tap0 <-- (payload size of 40 bytes populated with a file called test.txt)
# hping3 --icmp --interval 10 --beep target_IP_addres <-- (will continue to beep when the source could ping the target_IP_address. beep will stop as soon as the network is disconnected)
From
<https://learn-powershell.net/2011/01/31/quick-hits-ping-sweep-one-liner/>
# for i in 'seq 1 255'; do hping3 --count 1 x.x.x.$i 2>/dev/null | grep ip=; done [list those that repond, grep output for "ip="; taking the standard rror message and throwing them away ]
# hping3 target_IP_address <--
# tcpdump -nn host your_IP_address and host target_IP_address -p -i tap0 <-- (possibly stop iptables on the source linux machine
# hping3 -icmp -data 40 -file text.txt target_IP_address -p -i tap0 <-- (payload size of 40 bytes populated with a file called test.txt)
# hping3 --icmp --interval 10 --beep target_IP_addres <-- (will continue to beep when the source could ping the target_IP_address. beep will stop as soon as the network is disconnected)
#!/bin/bash
if [ "$1"
== "" ]
then
echo
"Uaage /pingweeps.sh
[network]"
echo "E.g
:/pingsweep.sh 102.168.1"
else
for ip in `seq 1 254` ; do
ping -c 1
$1.$ip | grep "64 bytes" | cut -d " " -f 4 | sed
's/://' &
done
fi
Oneliner ping from
powershell. Will ping first 20 ip of 192.168.1
ps>1..20 | % {"192.168.1.$($_):
$(Test-Connection -count 1 -comp 192.168.1.$($_) -quiet)"}
Oneliner ping from
cmd line
FOR /L %i in
(1,1,255) do @ping -n 1 192.168.100.%i | find "Reply"
cat ping3.txt | sort
-u
for ip in $(cat
iplist.txt); do nmap -Pn $ip; done
Comments
Post a Comment