Sign in to follow this  
Followers 0
kiwy

find mac address by mac

5 posts in this topic

#1 ·  Posted (edited)

Hello evrybody

Sorry for posting here, but I can't post in the good section (if someone can move my post it could be great)...

Find mac address with IP who never dream about that ?

I dev a script to get all the mac address of the local network devices, because the only program I try and work

was mac scanner and costing 100$

So I make a script that you configure with a configuration.ini file where you put a start ip and a stop ip for exemple 192.168.1.1 to 192.168.1.254 (only last number can vary) and if you want a mac filter to get only certain mac address (the tree first number of mac address represente a constructor)

And then you lunch the script... and after massive ping... Wonderfull... you get all the info in a new file

exemple

configuration.ini

####################################
#######ALWAYS RESPECT SYNTHAX#######
###############NO SPACE#############
####################################
[IP_RANGE]
start:xxx.xxx.xxx.xxx
stop:xxx.xxx.xxx.xxx

[filter]
mac_filter:xx-xx-xx(part or entire mac)

So I give here the source and a configuration.ini sample file (sorry source comments are in french)

If you have question, and I don't answer here, don't hesitate to use my email :)

Kiwy :party:

find_by_mac.au3

Edited by kiwy

Share this post


Link to post
Share on other sites



Hello evrybody

Sorry for posting here, but I can't post in the good section (if someone can move my post it could be great)...

Find mac address with IP who never dream about that ?

I dev a script to get all the mac address of the local network devices, because the only program I try and work

was mac scanner and costing 100$

So I make a script that you configure with a configuration.ini file where you put a start ip and a stop ip for exemple 192.168.1.1 to 192.168.1.254 (only last number can vary) and if you want a mac filter to get only certain mac address (the tree first number of mac address represente a constructor)

And then you lunch the script... and after massive ping... Wonderfull... you get all the info in a new file

exemple

configuration.ini

####################################
#######ALWAYS RESPECT SYNTHAX#######
###############NO SPACE#############
####################################
[IP_RANGE]
start:xxx.xxx.xxx.xxx
stop:xxx.xxx.xxx.xxx

[filter]
mac_filter:xx-xx-xx(part or entire mac)

So I give here the source and a configuration.ini sample file (sorry source comments are in french)

If you have question, and I don't answer here, don't hesitate to use my email :party:

Kiwy :idea:

You started using arrays, but then don't have For/Next loops to utilize them. Take this part of your code for example:
$PID[0]   = Run("ping -n 2 "&$ip&$ip_start_array[4])
$PID[1]   = Run("ping -n 2 "&$ip&$ip_start_array[4]+1)
$PID[2]   = Run("ping -n 2 "&$ip&$ip_start_array[4]+2)
$PID[3]   = Run("ping -n 2 "&$ip&$ip_start_array[4]+3)
$PID[4]   = Run("ping -n 2 "&$ip&$ip_start_array[4]+4)
$PID[5]   = Run("ping -n 2 "&$ip&$ip_start_array[4]+5)
$PID[6]   = Run("ping -n 2 "&$ip&$ip_start_array[4]+6)
$PID[7]   = Run("ping -n 2 "&$ip&$ip_start_array[4]+7)
$PID[8]   = Run("ping -n 2 "&$ip&$ip_start_array[4]+8)
$PID[9]   = Run("ping -n 2 "&$ip&$ip_start_array[4]+9)

Shouldn't that just be:

For $p = 0 To 9
    $PID[$p] = Run("ping -n 2 " & $ip & $ip_start_array[4] + $p)
Next

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

I'll watch this... but i'm not sure to really understand.

If I lunch the 10 first ping its only to intialized... but but now you say it... it's not very usefull :party:

I'll probably upgrade it soon to add ip filtering or to add some other little stuff

Thank you for your comment :)

Share this post


Link to post
Share on other sites

It's a nice script. I'd recommend to use the long form of the ip's and preform the loop, look here

Share this post


Link to post
Share on other sites

I not sure to understand how work you long IP, and I don't understand what i win to use this. making ping over ip class A, B, C without breaking my poor brain ?

I'll look carefully to your function.

But thanks for you congratulation, did you try it ?

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