-
Notifications
You must be signed in to change notification settings - Fork 1
/
urlforen.sh
71 lines (60 loc) · 1.64 KB
/
urlforen.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env bash
# command line vars
opt=$1
url=$2
# pause funct
function pause() {
read -sn 1 -p "Press any key to continue..."
}
# unshorten funct
function unshorten {
curl "https://unshorten.me/s/$url"
exit
}
# forensics w/ proxy
function foren {
echo "Obtaining header from "$url"."
echo
proxychains-ng curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" -I "$url"
echo
echo "Obtaining source from "$url"."
echo
proxychains-ng curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" "$url"
exit
}
# forensics w /o proxy
function noproxy {
echo "WARNING. YOU ARE PREFORMING FORENSICS ON A URL WITHOUT A PROXY!!!"
pause
clear
echo "Obtaining header from "$url"."
echo
curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" -I "$url"
echo
echo "Obtaining source from "$url"."
echo
curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" "$url"
exit
}
# just in case...
function helpme {
echo "Usage: urlforen [option] url"
echo
echo "-h, This menu."
echo "-s, Unshortens the URL."
echo "-n, Preforms forensics on URL without the use of proxychains."
echo
echo "Proxychains and curl must be installed for this to work."
exit
}
# The heart of the script
if [[ $opt == "-s" ]]; then
unshorten
elif [[ $opt == "-n" ]]; then
noproxy
elif [[ $opt == "-h" ]]; then
helpme
else
url=$opt
foren
fi