Sign in to follow this  
Followers 0
sebsabul

Mac Adresse

8 posts in this topic

:) Hey guy,

can I read the mac adresse from another computer with autoit3?

thank you for help..

Share this post


Link to post
Share on other sites



:) Hey guy,

can I read the mac adresse from another computer with autoit3?

thank you for help..

If you know the IP address of the other computer you could ping it to insure that the the IP -> MAC pairing is cached, then run ARP.EXE -a to list the whole ARP table, capture the output, split the output on @CRLF, match the line with your IP address, then split the matching line on whitespace and take the second element for the MAC address.

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Share this post


Link to post
Share on other sites

THANK YOU.

Can you help me with the script, please? I don´t understand the part with the split. Thank you for answers.

Share this post


Link to post
Share on other sites

PLEASE HELP ME WITH THE SCRIPT!

Share this post


Link to post
Share on other sites

PLEASE HELP ME WITH THE SCRIPT!

<{POST_SNAPBACK}>

You are getting VERY annoying constantly whining for people to help you. Ask your question and shut up. Somebody might help you, they might not. You significantly reduce your chances of getting help when you are annoying. Nobody is obligated to help you, people do this because they want to, not because they have to. Pissing them off is not the way to get help.

Share this post


Link to post
Share on other sites

Thats right, sorry, but I do that ´cause my topic should be the first in the forum, so more people read my problem and probably anyone can help me. But I know that isn´t fair. I don´t do it again. Sorry :-(

I hope anyone can help me, thanks.

Share this post


Link to post
Share on other sites

Hello,

so don't worry, be happy :)

I have written this script which locate the MAC adress in the lines of the file returned by arp -a.

But you have to verify that the parameters are the same with your OS.

#include <array.au3>
runwait(@ComSpec & " /c arp.exe -a > "&@tempdir&"\arplog.txt","",@SW_HIDE)
$fic=FileOpen(@tempdir&"\arplog.txt",0)
if $fic=-1 then Exit
$index=4; the list of IP/MAC begins at the 4th line of the file (for my case you have to verify !)
$tab_mac=""; array to stock mac
while 1
    $line=FileReadLine($fic,$index)
    if @error=-1 then ExitLoop
    $mac=StringMid($line,25,17); position of the mac in the line (verify for your case)
    $tab_mac=$tab_mac&$mac&";"
    $index=$index+1
WEnd
$tab_mac=StringSplit($tab_mac,";")
;now You've got an array with : $tab_mac[0]=nbre of mac+1 in the array, $tab_mac[1]=mac1 ....
_ArrayDisplay($tab_mac,"List of Mac")
;the last is empty because "" is after the last;

I hope it 'll help you


Share this post


Link to post
Share on other sites

Yes you helped me! THANK YOU VERY MUCH. You´re great.

Zitat: "

"my topic should be the first"

Yeah, great. Before doing something think what would happen if everybody does it. You dont have more rights then oth...

sugi Members 399 "

Yeah, i know. I said sorry before! Again: Sorry. You are right! Thanks for your help!

sebsabul

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