forked from leebaird/discover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalias
24 lines (21 loc) · 1012 Bytes
/
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
# To enable these aliases or when you modify this file:
# cp /opt/discover/alias /root/.bash_aliases ; source /root/.bash_aliases
dns=$(grep 'nameserver' /etc/resolv.conf | awk '{print $2}')
interface=$(ifconfig | grep -B1 'inet addr' | egrep -v '(-|inet addr|Loopback)' | cut -d ' ' -f1)
ip=$(ifconfig | grep 'Bcast' | awk '{print$2}' | cut -d ':' -f2)
mac=$(ifconfig | grep -B1 'inet addr' | egrep -v '(-|inet addr|Loopback)' | awk '{print$5}')
alias c='clear'
alias cl='clear ; ls -l'
alias d='cd /root/Desktop/ ; clear'
alias e='exit'
alias i='echo ; echo ; echo "DNS " $dns ; echo ; ifconfig ; ping google.com -c3 ; echo ; echo'
alias l='ls -l'
alias n='echo ; netstat -antup | egrep -v "Active" ; echo ;
echo -n "Interface: "$interface ; echo ;
echo -n "MAC address: "$mac ; echo ;
echo -n "Internal IP: "$ip ; echo ;
echo -n "External IP: " ; curl ifconfig.me ; echo'
alias r='cd /root/ ; clear'
alias s='cd /opt/discover/ ; clear'
alias sip='sort -V'
alias update='/opt/discover/update.sh'