forked from leebaird/discover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalias
29 lines (26 loc) · 1.1 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
dns=$(grep 'nameserver' /etc/resolv.conf | awk '{print $2}')
extip=$(curl -s http://ip-api.com/ | grep 'query' | cut -d '"' -f4)
ip=$(ifconfig | grep 'broadcast' | awk '{print $2}')
mac=$(ifconfig | grep 'ether' | awk '{print $2}')
user=$(whoami)
alias aws='ssh -i ~/.ssh/amazon.pem ec2-user@'
alias awsf='sftp -i ~/.ssh/amazon.pem ec2-user@'
alias awss='ssh -D 1080 -f -N -i ~/.ssh/amazon.pem ec2-user@'
alias awsv='ssh -L 5901:localhost:5901 -i ~/.ssh/amazon.pem ec2-user@'
alias nosocks="kill -9 $(ps aux | grep ssh | grep 'D 1080' | awk '{print $2}') 2>/dev/null"
alias c='clear'
alias cl='clear ; ls -l'
alias d='cd /$user/Desktop/ ; clear'
alias e='exit'
alias l='ls -l'
alias m='service postgresql start ; msfdb init ; msfconsole'
alias n='echo ; netstat -antp; echo ;
echo -n "External IP: "$extip ; echo ;
echo -n "Internal IP: "$ip ; echo ;
echo -n "MAC address: "$mac ; echo ;
echo -n "DNS "$dns ; echo ; echo ;
ping -c3 google.com ; 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'