Languages/shell/arp-scan
From UIT
(Difference between revisions)
Line 2: | Line 2: | ||
{{TOC right}} | {{TOC right}} | ||
− | Suppose you want to find a Raspberry Pi, on your local subnet. | + | Suppose you want to find a Raspberry Pi, on your local subnet, the RPi uses DHCP, here is how find it's address. |
<code lang="bash"> | <code lang="bash"> | ||
− | sudo arp-scan --interface= | + | sudo arp-scan --interface=eth0 --localnet | grep b8:27:eb |
</code> | </code> | ||
<pre> | <pre> | ||
− | + | XXX.XXX.XXX.42 b8:27:eb:xx:xx:xx (Unknown) | |
− | + | XXX.XXX.XXX.97 b8:27:eb:xx:xx:xx (Unknown) | |
</pre> | </pre> | ||
+ | No luck, we've two Raspberry on our network ;) | ||
* install arp-scan using <code>sudo apt-get install arp-scan</code> | * install arp-scan using <code>sudo apt-get install arp-scan</code> | ||
* Replace b8:27:eb by the OUI you're searching for, see [https://standards.ieee.org/develop/regauth/oui/oui.txt oui.txt] | * Replace b8:27:eb by the OUI you're searching for, see [https://standards.ieee.org/develop/regauth/oui/oui.txt oui.txt] | ||
* See also : [[Languages/shell/nmap | Finding a ssh host : <code>nmap</code>]] | * See also : [[Languages/shell/nmap | Finding a ssh host : <code>nmap</code>]] |
Latest revision as of 14:41, 28 October 2014
Suppose you want to find a Raspberry Pi, on your local subnet, the RPi uses DHCP, here is how find it's address.
sudo arp-scan --interface=eth0 --localnet | grep b8:27:eb
XXX.XXX.XXX.42 b8:27:eb:xx:xx:xx (Unknown) XXX.XXX.XXX.97 b8:27:eb:xx:xx:xx (Unknown)
No luck, we've two Raspberry on our network ;)
- install arp-scan using
sudo apt-get install arp-scan
- Replace b8:27:eb by the OUI you're searching for, see oui.txt
- See also : Finding a ssh host :
nmap