中国DOS联盟论坛

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-08-11 18:16
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Get the number of online people in the LAN within one minute (without relying on third-party software)
Printable Version  3,345 / 17
Floor1 ily2013 Posted 2008-11-07 17:55
中级用户 Posts 83 Credits 247
for /l %%i in (1 1 254) do start /min ping -n 1 192.168.1.%%i
arp -a|findstr /v "00-00-00-00-00-00"
The obtained MAC address is the number of people online in the current local area network! The gateway is not counted!

[ Last edited by ily2013 on 2008-11-7 at 18:00 ]
Floor2 liumingqing Posted 2008-11-07 18:55
初级用户 Posts 73 Credits 136
Nice! Got it!
I once thought about how to easily and quickly know the number of people online in the internal network, but there was no result. I saw it today!
However, my internal network IP is in the form of "192.168.0.*", and it can be used by changing only one character.
Floor3 clian76 Posted 2008-11-07 21:25
中级用户 Posts 162 Credits 363
It seems like we need to open 255 batch processing windows, and for computers with weaker configurations, well,...
Floor4 qcqtye Posted 2008-11-07 21:34
初级用户 Posts 14 Credits 26
After using it, a window opened, and then nothing was left.
Floor5 HAT Posted 2008-11-07 21:40
版主 Posts 5,017 Credits 9,023
Floor6 ily2013 Posted 2008-12-04 15:44
中级用户 Posts 83 Credits 247
Sometimes using this P to check the number of online users is really a bit frustrating, as so many windows need to be opened. Then nbtscan appeared. The following P processing is very fast to check the number of online users. Locally tested, it only takes a few seconds. nbtscan needs to be downloaded separately

@arp -d>nul 2>nul
@nbtscan 192.168.1.1/24>nul 2>nul
@arp -a|find /v "00-00-00-00-00-00"|find /v ":"|find "-"
Floor7 ktv98 Posted 2008-12-04 17:25
初级用户 Posts 81 Credits 112
After using it, several windows were opened, and then everything was gone.
Floor8 chenying1988 Posted 2008-12-04 19:03
新手上路 Posts 7 Credits 10
After running, opened n many windows, when opened to more than 30, afraid that the computer can't stand it and turned it off, there is room for improvement.
Floor9 bjdcom0226 Posted 2008-12-09 11:08
新手上路 Posts 3 Credits 4
I don't know if I can't use it, or if this thing is just a piece of trash!!!
It's just like infinite windows!!!!!
Floor10 yangjiang Posted 2008-12-09 12:49
初级用户 Posts 49 Credits 92
This thing is practical, not bad
Floor11 hefeilixin Posted 2008-12-11 20:47
新手上路 Posts 9 Credits 13
Just run it in the background.
Floor12 mmh1 Posted 2009-04-10 00:11
初级用户 Posts 24 Credits 20
for /l %%i in (1 1 254) do start /min ping -n 1 192.168.1.%%i
arp -a|findstr /v "00-00-00-00-00-00">>1.txt
Why is there no result after I run it?
Floor13 313885174 Posted 2009-04-10 04:33
中级用户 Posts 100 Credits 206
Originally posted by mmh1 at 2009-4-10 12:11 AM:
for /l %%i in (1 1 254) do start /min ping -n 1 192.168.1.%%i
arp -a|findstr /v "00-00-00-00-00-00">>1.txt
Why is there no result after I run it?


Try adding parentheses...
for /l %%i in (1 1 254) do (start /min ping -n 1 192.168.1.%%i
arp -a|findstr /v "00-00-00-00-00-00")>>1.txt
Floor14 zhym399 Posted 2009-04-11 02:18
初级用户 Posts 14 Credits 23
Floor15 provem Posted 2009-04-11 13:11
初级用户 Posts 82 Credits 92
nbtscan needs to be downloaded separately

Not bad

nbtscan download http://upload.cn-dos.net/img/1402.rar
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023