forked from aryanguenthner/365
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpingsweep6.sh
46 lines (44 loc) · 1.46 KB
/
pingsweep6.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
46
#!/bin/bash
#######################################################
# Discover IPv6 targets by doing a ping sweep
# Hosts that responded to ICMP are output to targets.txt
# Learn More @ https://github.com/aryanguenthner/
# Tested on Kali 2021.4
# Last updated 12/18/2021
######################################################
YELLOW='033m'
BLUE='034m'
SUBNET=`nmap --iflist | awk 'NR==9' | awk '{print $3}'`
TARGETS=ips.txt
KALI=`hostname -I`
EXT=`curl ifconfig.me`
FILE=$(date +%Y%m%d).nmap-pingsweep
mkdir -p /home/kali/Desktop/testing
#
echo $KALI | awk '{print $1}' > KALI.txt
#
echo
echo -e "\e[033mGetting Network Information\e[0m"
echo
echo -e "\e[033mExternal IP\e[0m"
echo $EXT
echo
echo -e "\e[033mKali IP\e[0m"
echo $KALI | awk '{print $1}'
echo
echo -e "\e[033mThe Target Subnet\e[0m"
echo $SUBNET
echo
echo -e "\e[033mGenerating a Target List\e[0m"
nmap -6 --stats-every=1m -sn -n $SUBNET --exclude $KALI -oG $(date +%Y%m%d).nmap-pingsweep
echo
#echo -e "\e[033mThese Hosts Are Up\e[0m"
echo -e "\033[33;5mThese Hosts Are Up\033[0m"
echo
cat $FILE | grep "Up" | awk '{print $2}' 2>&1 | tee targets.txt
echo
echo -e "\e[033mTarget List Ouput File -> targets.txt\e[0m"
echo
echo -e "\e[033mUse nmap to enumerate more info on your targets:\e[0m"
echo
echo "nmap -6 --stats-every=1m -T4 -Pn -vvvv -sTV -p- --open --script http-screenshot --min-rate=5000 --min-hostgroup=256 --min-parallelism=256 --max-retries 0 -iL targets.txt -oA /home/kali/Desktop/testing/$(date +%Y%m%d)_nmapscan"