[TOOL] Gather Windows Shares With an cmd-script
From: SecuriTeam (support_at_securiteam.com)
Date: 03/15/04
- Previous message: SecuriTeam: "[NEWS] Yahoo WebMail! Cross Site Scripting Vulnerability (order, sort)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
To: list@securiteam.com Date: 15 Mar 2004 09:47:49 +0200
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Gather Windows Shares With an cmd-script
------------------------------------------------------------------------
DETAILS
The following script can be used to enumerate windows shares on a network
without the need to install any special software. The script is
multithreaded and opens more than one console window. All opened windows
close by themselves when the script finishes.
@echo off
:
:
: -=[ (c) 2003-10-31 MrB ]=-
:
: collect the name of accessible Windows(R) shares
:
: syntax: openshare 192.168.0
: - scans all ip from 192.168.0.1 to 192.168.0.254
:
: This is a multithreading script (tm). ;-) So don't panic if you
: see many console windows in your taskbar. They are all closing
: by itself.
:
:
:cmd
if not "%5"=="" start "CMD" /min %0 %1 %2 %3 && shift /2 && shift /2 &&
goto :cmd
if "%0"=="%2" exit
if not "%4"=="" goto :netview
if "%1"=="" echo Nothing to do... && exit
if exist OpenShares.txt del OpenShares.txt
if "%2"=="" if exist *.pid del *.pid
if "%2"=="" start "CMD" /min %0 %1 1 20 21 41 42 62 63 83 84 104 105 125
126 146 147 167 168 188 189 209 210 230 231 254 %0 %1
if "%3"=="" ping 127.0.0.1 -n 5 > nul && goto :wait
echo.>%2.pid
for /L %%I in (%2,1,%3) do echo test if up: %1.%%I && ping %1.%%I -n 1 -w
1000 1>nul 2>nul && if errorlevel = 0 start "CMD" /min %0 %1.%%I %2 %3
%1.%%I
del %2.pid
exit
:wait
echo.&&echo ---[ Please wait... ]---
:wait2
ping 127.0.0.1 -n 2 > nul
if exist *.pid goto :wait2
if exist *.up goto :wait2
for %%I in (*.res) do type %%I >> OpenShares.txt && del %%I
if exist OpenShares.txt start OpenShares.txt
goto :end
:netview
net view \\%1 1> %1.up 2> nul
if errorlevel = 1 goto :endchild
ren %1.up %1.res
:endchild
if exist %1.up del %1.up
exit
:end
ADDITIONAL INFORMATION
The information has been provided by <mailto:bits_n_bytes@gmx.de> Frank
Dietrich.
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
- Previous message: SecuriTeam: "[NEWS] Yahoo WebMail! Cross Site Scripting Vulnerability (order, sort)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|