lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20040307145313.2a73c46a.bits_n_bytes@gmx.de>
From: bits_n_bytes at gmx.de (Frank Dietrich)
Subject: gather windows shares with an cmd-script

Hi,

i got an intersting cmd-script to gather shares in a windows network
without the need to install something.

Sorry for quoting long lines.

@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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ