Tags: MAC,bash,ethernet

Classer par : Date / Titre /

  1. il y a 2 ans par spirit et sauvegardé par 1 autre
    It needs gawk, sed and grep.
    1. arping -c 1 192.168.1.1 | grep ":" | sed "s/\[//g;s/\]//g" |gawk '{print $5}'
    2. # 00:AA:BB:CC:DD:EE
    3.  
    4. # Find MACs of all the hosts on a specific network with broadcast pings. Displays:
    5. # 192.168.1.1 -> 00:AA:BB:CC:DD:EE
    6. # 192.168.1.2 -> 00:FC:AE:5C:D1:A6
    7. # ...
    8. for i in `ping -b -c 5 192.168.1.255 | grep ": ic" | gawk '{print $4}' | sort -u | sed "s/://g"`
    9. do
    10.    arping -c 1 $i | grep ":" | sed "s/\[//g;s/\]//g" | gawk '{a=$4" -> "$5;print a}'
    11. done
    Copier ceci sur votre site: <script type="text/javascript" src="http://www.posteet.com/embed/430"></script>

Première / Précédent / Suivant / Dernière / Page 1 sur 1 (1 posteets)