General discussion

Locked

Seeing who's logged on your network....

By mike ·
Here is the batch file that answers the question of how to find out who is logged on and sharing what shares and loggin it to a file. The only extra file you need is alive.exe which is a freeware ping replacement. The syntax is ipscan.bat 111.111.111 leaving the last octet off to auto increment.

@echo off
rem begin ipscan.bat
Echo This file is intended for informational purposes only and should be used
echo to test the security of YOUR systems.
echo Starting >c:\ip.log
ECHO All information is being logged to c:\ip.log
SET H=0
SET T=0
SET D=0

:START
echo *
IGITS
if %D%==9 goto TENS
if %D%==8 set D=9
if %D%==7 set D=8
if %D%==6 set D=7
if %D%==5 set D=6
if %D%==4 set D=5
if %D%==3 set D=4
if %D%==2 set D=3
if %D%==1 set D=2
if %D%==0 set D=1
goto DONE
:TENS
set D=0
if %T%==9 goto HUNDREDS
if %T%==8 set T=9
if %T%==7 set T=8
if %T%==6 set T=7
if %T%==5 set T=6
if %T%==4 set T=5
if %T%==3 set T=4
if %T%==2 set T=3
if %T%==1 set T=2
if %T%==0 set T=1
goto DONE
:HUNDREDS
set T=0
if %H%==9 set H=0
if %H%==8 set H=9
if %H%==7 set H=8
if %H%==6 set H=7
if %H%==5 set H=6
if %H%==4 set H=5
if %H%==3 set H=4
if %H%==2 set H=3
if %H%==1 set H=2
if %H%==0 set H=1
goto DONE
ONE

echoChecking %1.%H%%T%%D%
alive /REPEAT=1 /TIMEOUT=1 %1.%H%%T%%D% >NUL
IF ERRORLEVEL 9 GOTO cont
IF ERRORLEVEL 8 GOTO cont
IF ERRORLEVEL 7 GOTO cont
IF ERRORLEVEL 6 GOTO cont
IF ERRORLEVEL 5 GOTO cont
IF ERRORLEVEL 4 GOTO cont
IF ERRORLEVEL 3 GOTO cont
IF ERRORLEVEL 2 GOTO cont
IF ERRORLEVEL 1 GOTO cont
IF ERRORLEVEL 0 GOTO good
:good
NBTSTAT -A %1.%H%%T%%D% | find "Registered" >>c:\ip.log
if not errorlevel 1 echo %1.%H%%T%%D% >>c:\ip.log
if not errorlevel 1 NBTSTAT -A %1.%H%%T%%D% | find "MAC Address" >>c:\ip.log


if not errorlevel 1 echo FOUND!!! IP extension For NetBios Security: %1.%H%%T%%D%
if not errorlevel 1 echo Getting NIC MAC Address for %1.%H%%

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Seeing who's logged on your network....

by mike In reply to Seeing who's logged on yo ...

Shoot I guess we have a char limit on the posts... whoops if you want the file e-mail me...
mike

Collapse -

Seeing who's logged on your network....

by techrep In reply to Seeing who's logged on yo ...

thanks, mike. now how do we go about giving you points for this???

Collapse -

Seeing who's logged on your network....

by mike In reply to Seeing who's logged on yo ...

Poster rated this answer

Collapse -

Seeing who's logged on your network....

by mike In reply to Seeing who's logged on yo ...

Don't know, I just like the satisfaction of helping people, sorta like the Jesus of TR:)
Good Skill
Mike

Collapse -

Seeing who's logged on your network....

by Baziite In reply to Seeing who's logged on yo ...

So you are going to award me ZERO points for answering the above question or " is questioning the above answer ".........

Collapse -

Seeing who's logged on your network....

by mike In reply to Seeing who's logged on yo ...

Poster rated this answer

Collapse -

Seeing who's logged on your network....

by mike In reply to Seeing who's logged on yo ...

This question was closed by the author

Back to Windows Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums