forked from leebaird/discover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalias
51 lines (39 loc) · 2.19 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
# 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}')
#ip=$(ifconfig | grep -B3 'status: active' | grep 'broadcast' | cut -d ' ' -f2) # modified for OS X
mac=$(ifconfig | grep 'ether' | awk '{print $2}')
#mac=$(ifconfig | grep 'ether' | awk '{print $2}' | head -1) # modified for OS X
user=$(whoami)
alias c='clear'
alias cl='clear ; ls -l'
alias d='cd /$user/Desktop/ ; clear'
#alias d='cd /Users/$user/Desktop/ ; clear' # modified for OS X
alias e='exit'
alias l='ls -l'
alias m='msfconsole'
#alias m='/opt/metasploit-framework/bin/msfconsole' # modified for OS X
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 ;
netstat -antp ; echo ;
#netstat | grep "ESTABLISHED" ; echo ; # modified for OS X
echo -n "External IP: " ; curl ifconfig.me ; echo'
alias r='cd /$user/ ; clear'
#alias r='cd /Users/$user/ ; clear' # modified for OS X
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'
#alias update='echo ; # modified for OS X
#echo -n "Updating Discover." ; echo ; # modified for OS X
#cd /opt/discover/ && git pull ; echo ; # modified for OS X
#echo -n "Updating SecLists." ; echo ; # modified for OS X
#cd /Users/$user/SecLists/ && git pull ; echo ; # modified for OS X
#echo -n "Updating Sqlmap." ; echo ; # modified for OS X
#cd /Users/$user/sqlmap/ && git pull ; echo ; # modified for OS X
#cd /Users/$user/ ; # modified for OS X
#echo -n "Updating locate database." ; echo ; # modified for OS X
#echo -n "Be patient, this takes a couple min." ; echo ; # modified for OS X
#sudo /usr/libexec/locate.updatedb ; echo' # modified for OS X