![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-24 15:16 |
47,812 topics / 349,917 posts / today 0 new / 48,274 members |
| DOS批处理 & 脚本技术(批处理室) » [Original] Find MAC by intranet host IP or host name |
| Printable Version 2,339 / 9 |
| Floor1 HUNRYBECKY | Posted 2007-02-02 00:56 |
| 银牌会员 Posts 442 Credits 1,179 | |
|
When bored, I post something to play around. There is a small software called Remote Power On. That small software can not only obtain the MAC address of the corresponding host by entering the IP, but also can remotely power on the host through the MAC.
As for how to use the MAC to remotely power on, I think it is difficult to implement with batch (those who can implement it, post a reply). But how to find the other party's MAC according to the IP or hostname can be implemented through the following code: |
|
| Floor2 HUNRYBECKY | Posted 2007-02-02 06:01 |
| 银牌会员 Posts 442 Credits 1,179 | |
|
Modify the code again to fix the error of not being able to obtain the local MAC, add the function of obtaining the MAC of all or specified IP segments, and also add the functions of MAC-IP binding and unbinding.
In addition, since it is slow to obtain all MACs, I started using the PING command and found it surprisingly slow. Finally, I changed to the TRACERT command and it was twice as fast, but scanning the entire network still takes about 1 minute. If there is a better method, I hope to post a reply [ Last edited by HUNRYBECKY on 2007-2-3 at 06:04 AM ] |
|
| Floor3 dj0733 | Posted 2007-02-02 08:28 |
| 初级用户 Posts 55 Credits 138 | |
|
Support the person above..
It's best to be like this " Choice: Output to IP-MAC to TXT? Hehe. Suggestion! |
|
| Floor4 bosskof | Posted 2007-02-02 09:35 |
| 初级用户 Posts 11 Credits 22 | |
| Floor5 PPdos | Posted 2007-02-02 12:19 |
| 高级用户 Posts 268 Credits 783 | |
| Floor6 bbq123bbq | Posted 2007-02-02 14:12 |
| 初级用户 Posts 77 Credits 197 | |
|
Support... Needs to be studied
|
|
| Floor7 HUNRYBECKY | Posted 2007-02-02 21:18 |
| 银牌会员 Posts 442 Credits 1,179 | |
Originally posted by PPdos at 2007-2-2 12:19: Thank you brother for providing the query, but it seems this is not of much use. In a diskless system, it can still be used to obtain the manufacturer code. Can you tell me what the purpose of this program is? This one seems unable to query the complete MAC address, so it can't be used in my program. |
|
| Floor8 HUNRYBECKY | Posted 2007-02-03 02:17 |
| 银牌会员 Posts 442 Credits 1,179 | |
Originally posted by bosskof at 2007-2-2 09:35: This command is good for getting the local real physical MAC, but it seems troublesome to get the external MAC, after all, you need to provide the username and password. |
|
| Floor9 electronixtar | Posted 2007-02-03 04:50 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
毕竟要提供用户名和密码。
这是因为getmac实际上是通过 WMI 操作的 After all, you need to provide a username and password. This is because getmac actually operates through WMI |
|
| Floor10 fbwolf | Posted 2007-02-04 00:42 |
| 初级用户 Posts 22 Credits 56 | |
|
Support
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |