-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalias
113 lines (95 loc) · 3.25 KB
/
alias
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# cp /opt/discover/alias /root/.bash_aliases ; source /root/.bash_aliases
dns=$(grep 'nameserver' /etc/resolv.conf | awk '{print $2}')
ip=$(ifconfig | grep 'broadcast' | awk '{print $2}')
mac=$(ifconfig | grep 'ether' | awk '{print $2}')
user=$(whoami)
alias c='clear'
alias cl='clear ; ls -l'
alias d='cd /$user/Desktop/ ; clear'
alias e='exit'
alias l='ls -l'
alias m='msfconsole'
alias n='echo ;
echo -n "DNS "$dns ; echo ;
echo -n "Internal IP: "$ip ; echo ;
echo -n "MAC address: "$mac ; echo ; echo ;
ping -c3 google.com ; echo ;
echo -n "External IP: " ; curl ifconfig.me ; echo'
alias r='cd /$user/ ; clear'
alias s='cd /opt/discover/ ; clear'
alias sip='sort -n -u -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4'
alias update='/opt/discover/update.sh'
###################################################################################
# OS X specific.
dns=$(grep 'nameserver' /etc/resolv.conf | awk '{print $2}')
ip=$(ifconfig | grep -B3 'status: active' | grep 'broadcast' | cut -d ' ' -f2)
mac=$(ifconfig | grep 'ether' | awk '{print $2}' | head -1)
user=$(whoami)
alias c='clear'
alias cl='clear ; ls -l'
alias d='cd /Users/$user/Desktop/ ; clear'
alias l='ls -l'
alias m='sudo /opt/metasploit-framework/bin/msfconsole'
alias mysql='/Applications/XAMPP/xamppfiles/bin/mysql -u root -p'
alias r='cd /Users/$user/ ; clear'
alias s='cd /Users/$user/tools/discover/ ; clear'
alias sip='sort -n -u -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4'
alias update='
clear
echo
if [ ! -d /Users/$user/tools ];
then mkdir /Users/$user/tools
fi
echo
if [ -d /Users/$user/tools/discover/.git ]; then
echo -n "[*] Updating Discover." ; echo
cd /Users/$user/tools/discover/ && git pull
echo
else
echo -n "[*] Installing Discover."
git clone https://github.com/leebaird/discover.git /Users/$user/tools/discover
echo
fi
if [ -d /Users/$user/tools/empyre/.git ]; then
echo -n "[*] Updating Empyre." ; echo
cd /Users/$user/tools/empyre/ && git pull
echo
else
echo -n "[*] Installing Empyre."
git clone https://github.com/adaptivethreat/EmPyre /Users/$user/tools/empyre
echo
fi
if [ -d /Users/$user/tools/exploit-db/.git ]; then
echo -n "[*] Updating Exploit DB." ; echo
cd /Users/$user/tools/exploit-db/ && git pull
echo
else
echo -n "[*] Installing Exploit DB."
git clone https://github.com/offensive-security/exploit-database.git /Users/$user/tools/exploit-db
echo
fi
echo -n "[*] Updating Metasploit." ; echo ;
/opt/metasploit-framework/bin/msfupdate ; echo ;
if [ -d /Users/$user/tools/seclists/.git ]; then
echo -n "[*] Updating SecLists." ; echo ;
cd /Users/$user/tools/seclists/ && git pull ; echo ;
else
echo -n "[*] Installing SecLists." ; echo ;
git clone https://github.com/danielmiessler/SecLists.git /Users/$user/tools/seclists
echo
fi
if [ -d /Users/$user/tools/sqlmap/.git ]; then
echo -n "[*] Updating Sqlmap." ; echo
cd /Users/$user/tools/sqlmap/ && git pull ; echo ;
else
echo -n "[*] Installing Sqlmap." ; echo
git clone https://github.com/sqlmapproject/sqlmap.git /Users/$user/tools/sqlmap
echo
fi
echo -n "[*] Updating locate database." ; echo ;
echo -n "Be patient, this takes a couple min." ; echo ;
sudo /usr/libexec/locate.updatedb
cd /Users/$user/
echo
echo
'