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-06-24 08:05
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » So many experts, who can write a program to scan the internal network IP and mac! View 7,350 Replies 51
Original Poster Posted 2006-12-29 04:54 ·  中国 湖北 荆门 电信
初级用户
Credits 36
Posts 15
Joined 2006-11-20 10:44
19-year member
UID 71131
Gender Male
Status Offline
Requirement: Can scan all online IPs and MACs within the local area network and output and save them as a *.txt file!!!

Experts, please come forward!!!!!

[ Last edited by ygzxw on 2006-12-28 at 04:05 PM ]
Floor 2 Posted 2006-12-29 04:56 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

  This website?? What is this website? Intranet?
Floor 3 Posted 2006-12-29 05:00 ·  中国 广东 深圳 电信
初级用户
Credits 32
Posts 16
Joined 2006-10-19 21:11
19-year member
UID 66985
Gender Male
Status Offline
Software can't even do it, let alone batch processing. If the users in the LAN haven't even turned on the server service, see how you're going to handle it
Floor 4 Posted 2006-12-29 05:03 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
Originally posted by mackyliu at 2006-12-28 16:00:
Software can't do it, let alone batch processing. If the users in the LAN haven't even turned on the server service, see how you can do it


  How can batch processing not work?
Floor 5 Posted 2006-12-29 05:04 ·  中国 湖北 荆门 电信
初级用户
Credits 36
Posts 15
Joined 2006-11-20 10:44
19-year member
UID 71131
Gender Male
Status Offline
Software can do it!! Many network management software can!! (This website is within the local area network)

I think there must be experts who can do it. There are many DOS experts here!~!
Floor 6 Posted 2006-12-29 05:06 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

  Re ygzxw:

  Please send me the result of the net view command on your internal network. I don't have a test environment here, so it's not easy to write code, so I can only refer to yours.
Floor 7 Posted 2006-12-29 05:12 ·  中国 湖北 荆门 电信
初级用户
Credits 36
Posts 15
Joined 2006-11-20 10:44
19-year member
UID 71131
Gender Male
Status Offline
Can't upload pictures here!!! Can't send
Floor 8 Posted 2006-12-29 05:14 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

Just send the text. net view >>netview.txt, send me the content of netview.txt.
Floor 9 Posted 2006-12-29 05:17 ·  中国 湖北 荆门 电信
初级用户
Credits 36
Posts 15
Joined 2006-11-20 10:44
19-year member
UID 71131
Gender Male
Status Offline
There are really many experts! Learned another trick, "net view >>netview.txt" can save the scan result as a text!

Server name Comment

-------------------------------------------------------------------------------
\\08A1A02668004B2
\\0B42C419F66F492
\\128217E5E2B843D
\\368138ECD3E8477
\\47F1FAEB1E114E7
\\5AC9C022019944A
\\77E1E3EB259D438
\\7F51BF1C1C044CE
\\A3119055661144B
\\ADMIN
\\B021CA4B672C4DE
\\BEE9AFE136394E9
\\YGZX-JIN
\\YGZX027
\\YGZX060 zjc
\\YGZX09
\\YGZX12
\\YGZX22
\\YGZX226
\\YGZX24
\\YGZX25
\\YGZX27
\\YGZX28
\\YGZX32
\\YGZX35
\\YGZX62
\\YGZX7 wjs007
\\YGZX95 ygzx95
\\YGZXCC36
\\YGZX110
The command completed successfully.

[ Last edited by ygzxw on 2006-12-28 at 04:21 PM ]
Floor 10 Posted 2006-12-29 05:18 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

  First try this, see if it works?

@echo off
for /l %%a in (1,1,254) do (
echo.&echo/&echo===================================>>list.txt
for /f "delims== tokens=2" %%i in ('nbtstat -a 192.168.1.%%a^|find "MAC Address"') do echo %%i------------192.168.1.%%a >>list.txt
)
pause
notepad.exe list.txt
goto :eof
Floor 11 Posted 2006-12-29 05:24 ·  中国 湖北 荆门 电信
初级用户
Credits 36
Posts 15
Joined 2006-11-20 10:44
19-year member
UID 71131
Gender Male
Status Offline
Testing is in progress!!!!!!!!!

Testing is completed! (Unsuccessful) Internal network IP: 192.168.0.1---192.168.0.254

Content in the saved file:
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================
==================================

[ Last edited by ygzxw on 2006-12-28 at 04:31 PM ]
Floor 12 Posted 2006-12-29 05:30 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

What do internal network IPs start with? Isn't it like 192.168.1.……?
Floor 13 Posted 2006-12-29 05:32 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

  Try again:

@echo off
for /l %%a in (1,1,254) do (
echo.&echo/&echo===================================>>list.txt
for /f "delims== tokens=2" %%i in ('nbtstat -a 192.168.0.%%a^|find "MAC Address"') do echo %%i------------192.169.0.%%a >>list.txt
)
pause
notepad.exe list.txt
goto :eof
Floor 14 Posted 2006-12-29 05:34 ·  中国 湖北 荆门 电信
初级用户
Credits 36
Posts 15
Joined 2006-11-20 10:44
19-year member
UID 71131
Gender Male
Status Offline
Originally posted by lxmxn at 2006-12-28 04:30 PM:

What does the internal network IP start with? Isn't it like 192.168.1.……?

Don't understand, please give instructions!?
Floor 15 Posted 2006-12-29 05:40 ·  中国 湖北 荆门 电信
初级用户
Credits 36
Posts 15
Joined 2006-11-20 10:44
19-year member
UID 71131
Gender Male
Status Offline
Originally posted by lxmxn at 2006-12-20 04:32 PM:

  Try again:

@echo off
for /l %%a in (1,1,254) do (
echo.&echo/&echo===================================>>list.txt
for /f "deli ...


The test result is the same as last time! When I tested for the first time, I changed the 1 in IP: 192.168.1.... to 0! !
Forum Jump: