-
Notifications
You must be signed in to change notification settings - Fork 1
/
pingweep.sh
46 lines (40 loc) · 1.06 KB
/
pingweep.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
START="\e[0;49;91m"
END="\e[0m"
#Banner
echo -e "${START}
(_)
____ _ ____ ____ _ _ _ ____ ____ ____
| _ \| | _ \ / _ | | | |/ _ ) _ ) _ \
| | | | | | | ( ( | | | | ( (/ ( (/ /| | | |
| ||_/|_|_| |_|\_|| |\____|\____)____) ||_/
|_| (_____| |_|
@johnthebug @kaipullas3c
${END}"
read -p "Enter ip address to be ping (ex: 192.168.54) : " ips
read -p "Enter the output file name:" out
if [ "$ips" == "" ]
then
echo " You forgot an ip address !"
else
if [[ $ips =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ]]
then
for ip in `seq 1 254`;
do
ping $ips.$ip -c 1 | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" >> $out.txt &
done
else
echo "not valid: "$ips
fi
fi
read -p "Do u want to run nmap on this ips (y or n):" ans
if [[ "$ans" == y||Y ]]
then
for ipad in $(cat $out.txt) ;
do
nmap -Pn $ipad > mapped$out.txt
done
else
continue
fi
echo "Thanks for using the tool"