navi: Add some IP helpers
This commit is contained in:
parent
4c1700b2c4
commit
01bf1a804d
@ -36,5 +36,13 @@ sudo deluser <user> <group>
|
||||
# Port binding
|
||||
sudo lsof -i:<port>
|
||||
|
||||
# Get IP on interface
|
||||
ip addr show dev <interface> | grep "inet " | sed "s/ *inet \([^ ]*\) .*/\1/" | awk -F: '{ print $1}'
|
||||
|
||||
# Get devices on interface
|
||||
nmap -sP <ip>
|
||||
|
||||
$ user: cat /etc/passwd | awk -F: '{ print $1}'
|
||||
$ group: cat /etc/group | awk -F: '{ print $1}'
|
||||
$ interface: ip link | grep "^[0-9]*:" | sed "s/[0-9]*: \(.*\):.*/\1/" | awk -F: '{ print $1}'
|
||||
$ ip: ip addr show dev <interface> | grep "inet " | sed "s/ *inet \([^ ]*\) .*/\1/" | awk -F: '{ print $1}'
|
||||
|
Loading…
x
Reference in New Issue
Block a user