China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-11 17:28
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Get the number of online people in the LAN within one minute (without relying on third-party software) View 3,342 Replies 17
Original Poster Posted 2008-11-07 17:55 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 247
Posts 83
Joined 2005-09-12 12:06
20-year member
UID 42446
Gender Male
Status Offline
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 ]
Floor 2 Posted 2008-11-07 18:55 ·  中国 广东 深圳 宝安区 电信
初级用户
★★
Credits 136
Posts 73
Joined 2007-04-02 05:47
19-year member
UID 83685
Gender Male
Status Offline
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.
Floor 3 Posted 2008-11-07 21:25 ·  中国 重庆 联通
中级用户
★★
Credits 363
Posts 162
Joined 2007-04-22 21:31
19-year member
UID 86104
Gender Male
Status Offline
It seems like we need to open 255 batch processing windows, and for computers with weaker configurations, well,...
Floor 4 Posted 2008-11-07 21:34 ·  中国 广东 广州 海珠区 电信
初级用户
Credits 26
Posts 14
Joined 2006-01-14 22:35
20-year member
UID 48984
Status Offline
After using it, a window opened, and then nothing was left.
Floor 5 Posted 2008-11-07 21:40 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Floor 6 Posted 2008-12-04 15:44 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 247
Posts 83
Joined 2005-09-12 12:06
20-year member
UID 42446
Gender Male
Status Offline
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 "-"
Floor 7 Posted 2008-12-04 17:25 ·  中国 福建 泉州 电信
初级用户
★★
Credits 112
Posts 81
Joined 2008-04-11 23:47
18-year member
UID 115654
Gender Male
Status Offline
After using it, several windows were opened, and then everything was gone.
CN-DOS批处理室非官方QQ群①:61377162 ②:70174619 ③:75070617
请勿尝试同时加多个群
Floor 8 Posted 2008-12-04 19:03 ·  中国 浙江 杭州 电信
新手上路
Credits 10
Posts 7
Joined 2008-11-26 21:48
17-year member
UID 132189
Gender Male
Status Offline
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.
Floor 9 Posted 2008-12-09 11:08 ·  中国 甘肃 兰州 电信
新手上路
Credits 4
Posts 3
Joined 2008-12-05 14:32
17-year member
UID 132966
Gender Male
Status Offline
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!!!!!
Floor 10 Posted 2008-12-09 12:49 ·  中国 广东 阳江 电信
初级用户
Credits 92
Posts 49
Joined 2006-10-22 12:22
19-year member
UID 67712
Gender Male
Status Offline
This thing is practical, not bad
Floor 11 Posted 2008-12-11 20:47 ·  中国 安徽 淮北 联通
新手上路
Credits 13
Posts 9
Joined 2008-11-28 09:38
17-year member
UID 132309
Gender Male
Status Offline
Just run it in the background.
Floor 12 Posted 2009-04-10 00:11 ·  中国 上海 松江区 电信
初级用户
Credits 20
Posts 24
Joined 2009-03-18 05:33
17-year member
UID 141631
Gender Male
Status Offline
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?
Floor 13 Posted 2009-04-10 04:33 ·  中国 江西 南昌 电信
中级用户
★★
Credits 206
Posts 100
Joined 2007-07-09 20:51
19-year member
UID 93566
Gender Male
Status Offline
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
Floor 14 Posted 2009-04-11 02:18 ·  中国 安徽 合肥 巢湖市 电信
初级用户
Credits 23
Posts 14
Joined 2007-05-16 23:36
19-year member
UID 88761
Gender Female
Status Offline
Floor 15 Posted 2009-04-11 13:11 ·  中国 重庆 电信
初级用户
★★
Credits 92
Posts 82
Joined 2007-11-13 23:35
18-year member
UID 102602
Gender Male
Status Offline
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 "-"

Not bad

nbtscan download http://upload.cn-dos.net/img/1402.rar
Forum Jump: