도전2022
mac address 조사하기. 본문
SMALL
Android 단말에서 Mac Addr을 조사해야 해서, 방법을 찾아 보았다.
1) 먼저 단말과 PC를 연결한다.
드라이버를 잡고, android-sdk내에 tools에 있는 adb 프로그램을 이용해서 연결한다.
2) adb shell 명령을 이용해서 단말과 연결한다.
3) Mac 조사 하기 위해서 ifconfig -a를 하면 다음과 같은 결과를 얻는다.
당연 Mac 주소는 HWaddr 에 있는 주소이다.
# ifconfig -a
ifconfig -a
eth0 Link encap:Ethernet HWaddr X:X:X:X:X:X
inet addr:X.X.X.X Bcast: X.X.X.X Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5718 errors:0 dropped:0 overruns:0 frame:0
TX packets:2978 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3173460 (3.0 MiB) TX bytes:298007 (291.0 KiB)
gre0 Link encap:UNSPEC HWaddr 00-00-00-00-FF-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1476 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:592 (592.0 B) TX bytes:592 (592.0 B)
tunl0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#
========================================================================================
========================================================================================
다음은 다양한 OS에서의 조사 방법이 있는 내용이다.
다음의 사이트에서 가지고 왔으며 내용이 삭제될까봐 기록해 놓는다.
How to find/display your MAC Address:
Unix/Linux
Vendor/Ethernet MAC Address Lookup and Search -> How to find/display your MAC Address -> Unix/Linux
Linux
Solaris/SunOS
FreeBSD/NetBSD
OpenBSD
Caldera/SCO UnixWare/OpenUNIX
HP-UX (HP UNIX)
IRIX (SGI UNIX)
NeXTStep (NeXT UNIX)
AIX (IBM UNIX)
Tru64 UNIX (Digital UNIX)
--------------------------
Linux
As the root user (or user with appropriate permissions)
Type "ifconfig -a"
From the displayed information, find eth0 (this is the default first Ethernet adapter)
Locate the number next to the HWaddr. This is your MAC address
The MAC Address will be displayed in the form of 00:08:C7:1B:8C:02.
Example "ifconfig -a" output:
eth0 Link encap:Ethernet HWaddr 00:08:C7:1B:8C:02
inet addr:192.168.111.20 Bcast:192.168.111.255 Mask:255.255.255.0
...additional output removed...
--------------------------
Solaris/SunOS
As the root user (or user with appropriate permissions)
Type "/sbin/ifconfig -a"
From the displayed information, find the Ethernet adapter (it will probably be called le0 or ie0)
Locate the number next to ether. This is your MAC address
The MAC Address will be displayed in the form of 0:3:ba:26:1:b0 -- leading zeros are removed. For this example, the actual MAC Address would be 00:03:ba:26:01:b0.
Example "ifconfig -a" output:
le0: flags=863 mtu 1500
inet 192.168.111.30 netmask ffffff00 broadcast 192.168.111.255
ether 0:3:ba:26:1:b0
--------------------------
FreeBSD/NetBSD
As the root user (or user with appropriate permissions)
Type "ifconfig -a"
From the displayed information, find the Ethernet adapter (the name changes based on the Ethernet card installed)
Locate the number next to the HWaddr. This is your MAC address
The MAC Address will be displayed in the form of 00:08:C7:1B:8C:02.
(Using the command"dmesg"will also display the MAC address -- along with a lot of other information)
Example "ifconfig -a" output:
ed0: flags=8843 mtu 1500
inet 192.168.111.40 netmask 0xffffff00 broadcast 192.168.111.255
ether 00:08:C7:1B:8C:02
...additional output removed...
--------------------------
OpenBSD
As the root user (or user with appropriate permissions)
Type "netstat -in"
From the displayed information, find the Ethernet adapter (the name changes based on the Ethernet card installed)
Locate the number below Address. This is your MAC address
The MAC Address will be displayed in the form of 00:08:c7:1b:8c:02.
Example "netstat -in" output:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Colls
fxp0 1500 <Link> 00:08:c7:1b:8c:02 4112773 0 224501 0 0
...additional output removed...
--------------------------
Caldera/SCO UnixWare/OpenUNIX
As the root user (or user with appropriate permissions)
Type "ndstat"
From the displayed information, find net0 (this is the default first Ethernet adapter)
Locate the number below MAC Address in use. This is your MAC address
The MAC Address will be displayed in the form of 00:00:c0:88:0a:2e.
Example "ndstat" output:
Device MAC address in use Factory MAC Address
------ ------------------ -------------------
/dev/net0 00:00:c0:88:0a:2e 00:00:c0:88:0a:2e
...additional output removed...
--------------------------
HP-UX (HP UNIX)
As the root user (or user with appropriate permissions)
Type "/usr/sbin/lanscan"
From the displayed information, find lan0 (this is the default first Ethernet adapter)
Locate the number below Address. This is your MAC address
The MAC Address will be displayed in the form of 0x000E7F0D81D6 -- the leading hexadecimal indicator should be removed. For this example, the actual MAC Address would be 00:0E:7F:0D:81:D6.
Example "lanscan" output:
Hardware Station Dev Hardware Net-Interface NM Encapsulation Mjr
Path Address lu State NameUnit State ID Methods Num
2.0.2 0x000E7F0D81D6 0 UP lan0 UP 4 ETHER 52
...additional output removed...
--------------------------
IRIX (SGI UNIX)
IRIX 4.01 or later
As the root user (or user with appropriate permissions)
Type "netstat -ia"
From the displayed information, find the Ethernet adapter (the name changes based on the Ethernet card installed)
Locate the number below Address. This is your MAC address
Alternate Method
Typing "/etc/nvram eaddr" should also show the MAC address
The MAC Address will be displayed in the form of 00:00:6b:71:1a:6a.
Example "netstat -ia" output:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
ec0 1500 nowhere warum 6514913 10234 184317 0 13513
192.168.111.90
00:00:6b:71:1a:6a
...additional output removed...
--------------------------
NeXTStep
As the root user (or user with appropriate permissions)
Type "/sbin/ifconfig -a"
From the displayed information, find the Ethernet adapter (it will probably be called le0 or ie0)
Locate the number next to ether. This is your MAC address
The MAC Address will be displayed in the form of 0:0:f:a1:75:a0 -- leading zeros are removed. For this example, the actual MAC Address would be 00:00:0f:a1:75:a0.
Example "ifconfig -a" output:
le0: flags=863 mtu 1500
inet 192.168.111.70 netmask ffffff00 broadcast 192.168.111.255
ether 0:0:f:a1:75:a0
--------------------------
AIX (IBM UNIX)
As the root user (or user with appropriate permissions)
Type "netstat -ia"
From the displayed information, find the Ethernet adapter (the name changes based on the Ethernet card installed)
Locate the number below Address. This is your MAC address
The MAC Address will be displayed in the form of 00:09:6B:51:1f:79.
Example "netstat -ia" output:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
ec0 1500 nowhere flotsam 5514233 11434 101317 0 14113
192.168.111.95
00:09:6B:51:1f:79
...additional output removed...
--------------------------
Tru64 UNIX (Digital UNIX)
As the root user (or user with appropriate permissions)
Type "netstat -ia"
From the displayed information, find the Ethernet adapter (the name changes based on the Ethernet card installed)
Locate the number below Address. This is your MAC address
The MAC Address will be displayed in the form of >00:00:F8:1a:73:da.
Example "netstat -ia" output:
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
ec0 1500 nowhere jetsam 5514233 11434 101317 0 14113
192.168.111.95
00:00:F8:1a:73:da
...additional output removed...
Send comments to jason @ coffer.com.
© 2004-2006. All rights reserved.
LIST
'작업' 카테고리의 다른 글
IDA PRO SDK 조사 (0) | 2009.11.12 |
---|---|
flex & bison 설치 (0) | 2009.11.12 |
SKAF 자료 조사 (0) | 2009.11.10 |
Boomerang (0) | 2009.11.09 |
win ce에서 1000단위 쉼표 넣기 (0) | 2009.11.03 |