| @@ -2,7 +2,8 @@ arp command with vendor information | |||
| 2 | 2 | ```sh | |
| 3 | 3 | arp -n | grep -viE "inc|iface" \ | |
| 4 | 4 | | while read -r ip type mac state ifname; \ | |
| 5 | - | do vendor=$(echo ${mac^^} | sed 's/://g' \ | |
| 5 | + | do vendor=$(echo ${mac^^} \ | |
| 6 | + | | sed 's/://g' \ | |
| 6 | 7 | | cut -c 1-6); echo -ne "${ifname}\t${ip}\t${mac} $(grep ${vendor} /usr/share/ieee-data/oui.txt \ | |
| 7 | 8 | | cut --output-delimiter=" " -c 1-6,23- )\n"; \ | |
| 8 | 9 | done | |
xl / arp + vendor info
Last active 3 months ago
xl revised this gist 1 year ago · 844b2b9
1 file changed, 2 insertions, 1 deletion
xl revised this gist 2 years ago · 99ed29d
1 file changed, 1 insertion, 1 deletion
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | arp command with vendor information | |
| 2 | 2 | ```sh | |
| 3 | - | sudo arp -n | grep -viE "inc|iface" \ | |
| 3 | + | arp -n | grep -viE "inc|iface" \ | |
| 4 | 4 | | while read -r ip type mac state ifname; \ | |
| 5 | 5 | do vendor=$(echo ${mac^^} | sed 's/://g' \ | |
| 6 | 6 | | cut -c 1-6); echo -ne "${ifname}\t${ip}\t${mac} $(grep ${vendor} /usr/share/ieee-data/oui.txt \ | |
xl revised this gist 2 years ago · 59ab1bc
1 file changed, 6 insertions, 6 deletions
| @@ -1,8 +1,8 @@ | |||
| 1 | 1 | arp command with vendor information | |
| 2 | 2 | ```sh | |
| 3 | - | sudo arp -n \ | |
| 4 | - | | grep -viE "inc|iface" \ | |
| 5 | - | | while read -r ip type mac state ifname; do vendor=$(echo ${mac^^} \ | |
| 6 | - | | sed 's/://g' \ | |
| 7 | - | | cut -c 1-6); echo -ne "${ifname}\t${ip}\t${mac} $(grep ${vendor} /usr/share/ieee-data/oui.txt \ | |
| 8 | - | | cut --output-delimiter=" " -c 1-6,23- )\n"; done | |
| 3 | + | sudo arp -n | grep -viE "inc|iface" \ | |
| 4 | + | | while read -r ip type mac state ifname; \ | |
| 5 | + | do vendor=$(echo ${mac^^} | sed 's/://g' \ | |
| 6 | + | | cut -c 1-6); echo -ne "${ifname}\t${ip}\t${mac} $(grep ${vendor} /usr/share/ieee-data/oui.txt \ | |
| 7 | + | | cut --output-delimiter=" " -c 1-6,23- )\n"; \ | |
| 8 | + | done | |
xl revised this gist 2 years ago · 87b3ffa
2 files changed, 8 insertions, 2 deletions
| @@ -1,2 +0,0 @@ | |||
| 1 | - | # arp command with vendor information | |
| 2 | - | sudo arp -n | grep -viE "inc|iface" | while read -r ip type mac state ifname; do vendor=$(echo ${mac^^} | sed 's/://g' | cut -c 1-6); echo -ne "${ifname}\t${ip}\t${mac} $(grep ${vendor} /usr/share/ieee-data/oui.txt | cut --output-delimiter=" " -c 1-6,23- )\n"; done | |
| @@ -0,0 +1,8 @@ | |||
| 1 | + | arp command with vendor information | |
| 2 | + | ```sh | |
| 3 | + | sudo arp -n \ | |
| 4 | + | | grep -viE "inc|iface" \ | |
| 5 | + | | while read -r ip type mac state ifname; do vendor=$(echo ${mac^^} \ | |
| 6 | + | | sed 's/://g' \ | |
| 7 | + | | cut -c 1-6); echo -ne "${ifname}\t${ip}\t${mac} $(grep ${vendor} /usr/share/ieee-data/oui.txt \ | |
| 8 | + | | cut --output-delimiter=" " -c 1-6,23- )\n"; done | |
xl revised this gist 2 years ago · db114db
1 file changed, 1 insertion, 1 deletion
| @@ -1,2 +1,2 @@ | |||
| 1 | 1 | # arp command with vendor information | |
| 2 | - | sudo arp -n | grep -viE "inc|iface" | while read -r ip type mac state ifname; do vendor=$(echo ${mac^^} | sed 's/://g' | cut -c 1-6); echo -ne "${ifname}\t${ip}\t${mac} $(grep ${vendor} /usr/share/ieee-data/oui.txt | cut --output-delimiter=" " -c 1-6,23- )\n"; done | |
| 2 | + | sudo arp -n | grep -viE "inc|iface" | while read -r ip type mac state ifname; do vendor=$(echo ${mac^^} | sed 's/://g' | cut -c 1-6); echo -ne "${ifname}\t${ip}\t${mac} $(grep ${vendor} /usr/share/ieee-data/oui.txt | cut --output-delimiter=" " -c 1-6,23- )\n"; done | |
xl revised this gist 2 years ago · 07348c1
1 file changed, 2 insertions
| @@ -0,0 +1,2 @@ | |||
| 1 | + | # arp command with vendor information | |
| 2 | + | sudo arp -n | grep -viE "inc|iface" | while read -r ip type mac state ifname; do vendor=$(echo ${mac^^} | sed 's/://g' | cut -c 1-6); echo -ne "${ifname}\t${ip}\t${mac} $(grep ${vendor} /usr/share/ieee-data/oui.txt | cut --output-delimiter=" " -c 1-6,23- )\n"; done | |