Languages/shell/arp-scan

From UIT
(Difference between revisions)
Jump to: navigation, search
 
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=br0 --localnet | grep b8:27:eb
+
sudo arp-scan --interface=eth0 --localnet | grep b8:27:eb
 
</code>
 
</code>
  
 
<pre>
 
<pre>
153.109.5.42 b8:27:eb:48:fc:d6 (Unknown)
+
XXX.XXX.XXX.42 b8:27:eb:xx:xx:xx (Unknown)
153.109.5.97 b8:27:eb:fb:b7:95 (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 13: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 ;)

Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox