獲取Mac位址的指令碼

2021-09-22 16:34:02 字數 928 閱讀 7091

@echo off

echo get mac address

echo please wait...

getmac /v | find /i "intel(r)" > mac.txt

getmac /v | find /i "asix" >> mac.txt

getmac /v | find /i "realtek" >> mac.txt

getmac /v | find /i "qualcomm" >> mac.txt

echo get mac address success

pause

exit

step 1:新建macaddress.bat檔案

step2:複製以上指令碼到macaddress.bat中儲存

step3:在cmd命令中執行macaddress.bat

step4:可以看到生成了乙個mac.txt檔案

step5:開啟mac.txt可以檢視到mac

ifconfig | grep -a 4 en0 | grep ether >>desktop/mac位址.txt

ifconfig | grep -a 3 en[1-9]: |grep -a 3 running,******x | grep ether >>desktop/mac位址.txt

step 1:新建macaddress.s**件

step2:複製以上指令碼到macaddress.sh中儲存

step3:在shell中執行macaddress.sh

獲取MAC位址

簡單的辦法是在控制台輸入ping 目標ip,然後用 arp a 來檢視.或者下面的 記下來以備後用 private declare function inet addr function inet addr lib wsock32.dll byval s as string as int32 pri...

獲取ios的MAC位址

include per msqr include include include pragma mark mac return the local mac addy courtesy of freebsd hackers email list accidentally munged during p...

獲取Android的MAC位址

在android平台上,如果在開始啟動前去載入乙個測試程式,該測試程式的功能是去讀取wifi的mac位址,然後顯示出來,顯示的方式可以使用移植recovery源 的miniui。那麼讀wifi的mac位址無疑便是要初始化,裝載wifi驅動後,通過cat sys class net wlan0 add...