Sign in to follow this  
Followers 0
Buffo

Translate Mac Addresses To IP

17 posts in this topic

Is there a possibility to translate mac adresses to ip?

I want to get the IPs in my home network. Only the mac-addressess of the wlan-users are shown.

Apps like Etherpeek can do so, but I want a handy little AutoIt-Script ;-)

Regards,

Buffo

Share this post


Link to post
Share on other sites



If you use xp, check out the "getmac.exe" command. This will do what you need. Else you can use the "nbtstat -A [iP address]" command.

Share this post


Link to post
Share on other sites

Thx for your reply, but I don't have the IPs, I only have the mac-addresses.

Getmac will show me the mac of a computer and for nbtstat I have to give an IP-Address, but I dont't have one ;-)

Regards,

Buffo

Share this post


Link to post
Share on other sites

I think you don't understand me:

Here a further explanation:

In my WLAN-router is a menu to display all wireless connected computers. But this computers are shown only with their mac-addresses.

Now I want to get the used local IP-addresses on the basis of the shown mac-addresses to identify which computers this are. I know all IP-Addresses because I attach them manually myself.

Regards,

Buffo

Share this post


Link to post
Share on other sites

I think you don't understand me:

Here a further explanation:

In my WLAN-router is a menu to display all wireless connected computers. But this computers are shown only with their mac-addresses.

Now I want to get the used local IP-addresses on the basis of the shown mac-addresses to identify which computers this are. I know all IP-Addresses because I attach them manually myself.

Regards,

Buffo

Ohh... B) You want to get an IP address from a MAC Address... I had looked into this once before and don't think I came up with anything. I'll dig around again.

Share this post


Link to post
Share on other sites

Here's an Idea. Have you tred to do an "arp -a" command to see if it's listed there? That maybe one way to get it. :o

Yes, that is exactly what I want :graduated:

This output I can analyze and save in arrays.

I didn't know this command, but now I'll never forget ;-)

Regards,

Buffo

BTW: @Mods: Can you correct my topic title Mac instead of Max. I am writing on my tiny notebook keyboard and came on another key ;-) I didn't find my own topic B)

Share this post


Link to post
Share on other sites

I'm glad I can help.

On a side note. I think we were all confused due to your topic title.

Translate Max Addresses To IP

B)

Share this post


Link to post
Share on other sites

I would think that ipconfig /all would give better info

would have a mac address and ip address.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

I would think that ipconfig /all would give better info

would have a mac address and ip address.

Yes it will give more information, but "ipconfig" will only give the information about the current machine. Not "Translate a MAC address to an IP" on a remote PC.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

I've been wondering about this myself for a few years (wireless security on my school network is a big deal in the Tech Team), however, I have been unable to find a RARP (Reverse ARP) application.

Edit: According to a Google Groups post, rarp and arping are linux cmdline tools...(my suse 10 kernel doesn't support rarp though, can't test arping yet)

Edited by MSLx Fanboy

Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

...I didn't find my own topic B)

This is an off topic post, but I'm kinda off, so...

Click on:

AutoIt Forums > AutoIt v3 > v3 Support

...at the bottom right of the page:

change

"Topics: All"

to

"Topics: I Started"

or

"Topics: I Replied"

...then press "Go"

...then typos won't matter so much :-)


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

If you want something returned by ARP -a, you have to ping first your IP addresses, the ARP table is filled up by any protocol used, but flushed after a while ... When You just boot up your system, this table is empty. B)

Share this post


Link to post
Share on other sites

If you want something returned by ARP -a, you have to ping first your IP addresses, the ARP table is filled up by any protocol used, but flushed after a while ... When You just boot up your system, this table is empty. B)

from what i've read it's flushed after 2 minutes.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Here's something else that might be used

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"

$Output=""
$Output = $Output & "Computer: " & $strComputer  & @CRLF
$Output = $Output & "==========================================" & @CRLF
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled != 0", "WQL", _
                                          $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If IsObj($colItems) then
   For $objItem In $colItems
      $Output = $Output & "Caption: " & $objItem.Caption & @CRLF
      $strDefaultIPGateway = $objItem.DefaultIPGateway(0)
      $Output = $Output & "DefaultIPGateway: " & $strDefaultIPGateway & @CRLF
      $Output = $Output & "Description: " & $objItem.Description & @CRLF
      $Output = $Output & "DNSDomain: " & $objItem.DNSDomain & @CRLF
      $Output = $Output & "DNSHostName: " & $objItem.DNSHostName & @CRLF
      $strIPAddress = $objItem.IPAddress(0)
      $Output = $Output & "IPAddress: " & $strIPAddress & @CRLF
      $Output = $Output & "IPEnabled: " & $objItem.IPEnabled & @CRLF
      $strIPSubnet = $objItem.IPSubnet(0)
      $Output = $Output & "IPSubnet: " & $strIPSubnet & @CRLF
      $Output = $Output & "MACAddress: " & $objItem.MACAddress & @CRLF
      if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop
      $Output=""
   Next
Else
   Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_NetworkAdapterConfiguration" )
Endif
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0