forked from aryanguenthner/365
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget-ip.sh
31 lines (30 loc) · 808 Bytes
/
get-ip.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
#!/bin/bash
################################################
# Discovery Phase of a Penetration Test
# Tested On Kali 2019.3
# Get the IP Address of Your Target
# This is an Interactive Script
# Results are saved in ip.txt
# Usage: ./getip.sh
# Learn more at https://github.com/aryanguenthner
# Last Updated 2019-10-15
################################################
echo
echo "Usage: ./getip.sh"
echo
echo "Get the IP address of your target"
echo
echo -n "Enter Target's Domain Name ie. example.com: "
read domain
echo
echo "Give it a sec, it's getting real"
echo
echo
# If it all worked then the IP Address will be in ip.txt
ping -c 1 $domain | tee ping.txt | awk 'NR==1' | tr -d '()' | awk '{print $3}' | tee ip.txt
echo
echo "Saving IP address into ip.txt"
echo
echo
# Best Team Ever!
echo "Go Ducks!"