hacking contest

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

Full Version: Batch Help
MxMx
hey all ..

I need some help with the output file..
Im making a .bat autochecker and now I have to output the ips also..

set /p scantxt= Enter Scan File:
set /p vport= Enter Remote Port:
for /f "eol=; tokens=1*" %%Q in (%scantxt%) do program.exe %%Q %vport% >> checked.txt

this is what I have .. but now I have to get those IPs from %scantxt% in the checked.txt log .. can someone help me editing my .bat please :0

Thanq
dmg
Looks fine to me.... Doesn't it work the way you expected? Wat goes wrong?

I'm sure a lot of folks are willing to help you (including me). Maybe it would help if you would give some more info on what exactly you want the script to do and what it does now.

//edit
do you mean something like this:
CODE

set logfile=checked.txt
set /p scantxt= Enter Scan File:
set /p vport= Enter Remote Port:
for /f "eol=; tokens=1*" %%Q in (%scantxt%) do (
         echo Checking %%Q>>%logfile%
         program.exe %%Q %vport%>>%logfile%
)
MxMx
well I want this batch to be a SQLHello Scanner..
I have a SQLversion checker .. I know which SQLversions are vuln ..
the command for the prog is sqlver.exe ip port .. but it only outputs the sqlversion and not the ip I entered .. this is very anoying for a scanner not outputting the ip .. so what i need it that this batch file adds the checked ip to the output.txt so we know which ip is running which sql version .. so it easier to locate the vuln ones .. hope you have enough information now ..

Thanq

\\ edit :

exactly what I needed .. thanq so very much tongue.gif biggrin.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.