![]() |
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-10-01 00:53 |
47,813 topics / 349,918 posts / today 0 new / 48,279 members |
| DOS批处理 & 脚本技术(批处理室) » So many experts, who can write a program to scan the internal network IP and mac! |
| Printable Version 8,412 / 51 |
| Floor16 ygzxw | Posted 2006-12-29 05:56 |
| 初级用户 Posts 15 Credits 36 | |
|
The result of this test which took 10 minutes (the batch file seems to still be running):
list.txt ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== 00-0A-EB-F9-0F-F4 ------------192.168.0.28 ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== ================================== Strange, only one IP and MAC were scanned [ Last edited by ygzxw on 2006-12-28 at 04:58 PM ] |
|
| Floor17 lxmxn | Posted 2006-12-29 06:02 |
| 版主 Posts 4,938 Credits 11,386 | |
|
|
|
| Floor18 lxmxn | Posted 2006-12-29 06:03 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Could it be that your internal network host has some restrictions? I tested and my own can get results. |
|
| Floor19 ygzxw | Posted 2006-12-29 06:12 |
| 初级用户 Posts 15 Credits 36 | |
|
My computer has no restrictions at all! This local area network, I am the network administrator!!!!!
[ Last edited by ygzxw on 2006-12-28 at 05:15 PM ] |
|
| Floor20 lxmxn | Posted 2006-12-29 06:18 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Then take any intranet IP to test, for example: nbtstat -a 192.168.0.24, see what the result is? |
|
| Floor21 9527 | Posted 2006-12-29 06:36 |
| 银牌会员 Posts 438 Credits 1,185 From 北京 | |
|
```
@echo off arp -d for /l %%i in (0,1,128) do ping 192.168.1.%%i -n 1 >nul arp -a >11.txt arp -d for /l %%i in (128,1,255) do ping 192.168.1.%%i -n 1 >nul arp -a >>11.txt arp -d ``` |
|
| Floor22 ygzxw | Posted 2006-12-29 06:36 |
| 初级用户 Posts 15 Credits 36 | |
|
CODE:
-------------------------------------------------------------------------------- @echo off set/p=>list.txt<nul for /l %%a in (1,1,254) do ( echo.&echo. for /f "delims== tokens=2" %%i in ('nbtstat -A 192.168.0.%%a^|find "MAC Address"') do ( echo==========================>>list.txt echo %%i=======192.168.0.%%a >>list.txt ) ) pause start list.txt goto :eof Now it's okay, but it's extremely slow!!!! Test results: ========================= 00-0A-EB-F9-0F-** =======192.168.0.28 ========================= 00-05-5D-5D-A0-** =======192.168.0.60 ========================= 00-E0-4C-C4-3E-** =======192.168.0.63 ========================= 00-0A-EB-6F-4E-** =======192.168.0.65 ========================= 00-0A-EB-F9-0F-** =======192.168.0.66 [ Last edited by ygzxw on 2006-12-28 at 05:47 PM ] |
|
| Floor23 lxmxn | Posted 2006-12-29 06:57 |
| 版主 Posts 4,938 Credits 11,386 | |
|
The main reason for the slow speed is the delay caused by the nbtstat command detecting inactive IPs. |
|
| Floor24 ygzxw | Posted 2006-12-29 07:10 |
| 初级用户 Posts 15 Credits 36 | |
|
I understand, thank you!
|
|
| Floor25 ccwan | Posted 2006-12-29 07:27 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
|
Oh no, I taught the technology to the Japanese.
|
|
| Floor26 qzwqzw | Posted 2006-12-29 07:34 |
| 银牌会员 Posts 636 Credits 2,343 | |
|
Scanning MAC without nbtstat
Using ping -n 1 -w 10 IP first, then arp -a | find "IP" is a better solution Because using ping can quickly detect the connection Command line solution for /l %l in (1,1,254) do @(ping -n 1 -w 10 192.168.0.%l>nul && arp -a | find " 192.168.0.%l ") |
|
| Floor27 qzwqzw | Posted 2006-12-29 07:46 |
| 银牌会员 Posts 636 Credits 2,343 | |
|
Sorry, just saw the plan of 9527, mine is invalid.
I don't know how large the ARP table of WIN can be? |
|
| Floor28 tao0610 | Posted 2006-12-29 07:54 |
| 高级用户 Posts 218 Credits 579 | |
|
In fact, the MAC table obtained by relying on IP with batch processing commands cannot guarantee authenticity.
|
|
| Floor29 tghksj | Posted 2006-12-30 23:25 |
| 社区乞丐 Posts 90 Credits -49 | |
|
re lxmxn
----------------------- Obtain the "computer name" list using net view Obtain MAC using nbtstat -a "computer name" ------------------------ [ Last edited by tghksj on 2006-12-30 at 12:34 PM ] |
|
| Floor30 mackyliu | Posted 2006-12-31 00:43 |
| 初级用户 Posts 16 Credits 32 | |
|
Batch processing also requires the support of system services.
For example, in my company's local area network, all are single - machine Internet access, no sharing is needed, the Server service is not even started, and it accesses the Internet through a router, with DHCP automatically obtaining the IP. In this case, I think this batch processing has no use. |
|
| Prev 1 2 3 4 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |