BuzzDee
Jan 20 2004, 11:26 AM
hi!
i coded a vbscript which automatically exploits ips from a text-file. my question is: how can i edit the vbscript so that it only exploits 20 targets in one go, then the next 20 ips, then the next... . because when i have 1000 scan results my pc crashes ^^ or is there a way to do this with a batch file? with a batch file i only know how to exploit one ip, then another, then another....
would be nice if u could help me...

greetz
andydis
Jan 20 2004, 11:58 AM
show us part of a edited script and ill have a look :-)
BuzzDee
Jan 20 2004, 12:26 PM
well heres the script.
////////////////////////////////////////////////////////////////////
`frontpage-script
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("scan.txt",1)
Do Until objTextFile.AtEndOfStream
strip = objTextFile.Readline
runstr = "fp30reg.exe " & strip & " "
dim wsh
set wsh = CreateObject("WScript.Shell")
wsh.run(runstr)
Loop
////////////////////////////////////////////////////////////////////
dmg
Jan 20 2004, 12:57 PM
I always use:
for /F %%a in (scan.txt) do command %%a
Or with more commands per ip:
for /F %%a in (scan.txt) do (
command1 %%a
command2 %%a
command3 %%a
)
The same can also be done like this:
for /F %%a in (scan.txt) do call :hax %%a
exit
:hax
command1 %1
command2 %1
command3 %1
The script will parse one IP at a time though, I don't know if this is a problem for you.
andydis
Jan 20 2004, 01:12 PM
you could wack a "start in front of every command dmg said
and itll open loads dos prompts but close them again,
u better have alot of RAM, lol, am looking at other ways.......
for /F %%a in (scan.txt) do (
start command1 %%a
start command2 %%a
start command3 %%a
dmg
Jan 20 2004, 02:32 PM
| QUOTE (andydis @ Jan 20 2004, 01:12 PM) |
you could wack a "start in front of every command dmg said and itll open loads dos prompts but close them again, u better have alot of RAM, lol, am looking at other ways.......
for /F %%a in (scan.txt) do ( start command1 %%a start command2 %%a start command3 %%a |
Don't forget the closing bracket:
)
BuzzDee
Jan 20 2004, 03:08 PM
well does it exploit one ip after the other then? or how can u set a number of ips which are to be exploited @ once?
thx
andydis
Jan 21 2004, 10:34 AM
buzzdee, try it, make the batch file with the "start" at the begining of each line and it will do the commands to all the ips almost at the same time,
it will open a new windows for each command tho....... fun :-)
FiNaLBeTa
Jan 21 2004, 11:13 AM
| QUOTE (dmg @ Jan 20 2004, 12:57 PM) |
I always use:
for /F %%a in (scan.txt) do command %%a
Or with more commands per ip:
for /F %%a in (scan.txt) do ( command1 %%a command2 %%a command3 %%a )
The same can also be done like this:
for /F %%a in (scan.txt) do call :hax %%a exit :hax command1 %1 command2 %1 command3 %1
The script will parse one IP at a time though, I don't know if this is a problem for you. |
Can you explain le how the /F %%a works?
I've seen it alot, but i don't understand wy there are 2 %%.
dmg
Jan 21 2004, 11:25 AM
There are two %% because you use it in a script. On the commandline you use one %
Example; Put the current date in variable %blaat%:
on the commandline you would use:
for /F "tokens=2" %a in ('date /T') do set blaat=%a
In a script you would use:
for /F "tokens=2" %%a in ('date /T') do set blaat=%%a
FiNaLBeTa
Jan 21 2004, 11:44 AM
thnx , now i understand the tokens two.
BuzzDee
Jan 21 2004, 02:36 PM
worx perfect!

thx alot for ur help guys!
greetz,
buzz
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.