By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,610 Members | 1,597 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,610 IT Pros & Developers. It's quick & easy.

How to spawn multiple Ping Process

P: n/a
I need to do a ping scan of a subnet.
I can Enum through the IPs and do this, but it takes over 5 minutes as
I can only create 1 process at a time. Does anyone know how I can
create multiple Ping Processes so as to send out 255 pings at once?
(sort of a reverse ping flood).

FYI: using the " -n 1" switch with Ping will cause it to only send 1
ping.
Basicly the code is:

For i = 1 to 255
Dim MyProc as new Process
MyProc.StartInfo.FileName = "ping"
MyProc.StartInfo.Arguments = "192.168.1." & i.tostring & " -n 1"
MyProc.StartInfo.CreateNoWindow = True
MyProc.StartInfo.RedirectStandardOutput = True
MyProc.StartInfo.UseShellExecute = False
MyProc.Start
Dim MyReturnString as string = MyProc.StandardOutput.ReadToEnd
MyProc = Nothing

GoDoSub_UseString (MyReturnString)
Next i

In my sub GoDoSub_UseString() I take the Ping output and see if the
ping returned a pong, or if it timed out. This way I can compile a
list of live IPs.
I have tried to create a collection of 255 processes then run through
the collection and call MyProc.Start in each, but it still pauses
after each MyProc.Start.
Anyone? ThankyouThankyou -scott
Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.