[jcifs] Multiple host SMB Crawler

Dan Dumont Dan at canofsleep.com
Thu Apr 17 10:12:38 EST 2003

>	That's right; mpxCount will be 100 so it waits for someone to make
>	progress.
Actually...   mpxCount is 2...  so is maxMpxCount.

And there are 2 threads that are running... all the others wait on the ones
in the 1min 15 sec loop (though I thought I waited for well over 2 minutes
without any signs of progress.  I'll check again.)


-----Original Message-----
From: Allen, Michael B (RSCH) [mailto:Michael_B_Allen at ml.com] 
Sent: Wednesday, April 16, 2003 7:10 PM
To: 'Dan Dumont'
Cc: 'jcifs at samba.org'
Subject: RE: [jcifs] Multiple host SMB Crawler

Please send all message to the jCIFS mailing list.

> -----Original Message-----
> From:	Dan Dumont [SMTP:Dan at canofsleep.com]
> However, what I found was that if I modified the maxMpxCount to 100 in
> code.  The indexing program will run at full speed (note I tried setting
> this in the options and it didn't work...  at all.  Perhaps I am doing
> something wrong)
	No, that is not read as property in the MpxControl constructor where
	changing it.

> However, after about 100 ip address have been...  indexed, or discarded or
> whatever, all the threads lock up in
> synchronized int aquireMid() throws InterruptedException {
>             while( mpxCount >= maxMpxCount ) {
>                 wait();
>             }
> ^^^  there.
	That's right; mpxCount will be 100 so it waits for someone to make

> Is the timeout like... really high or something, so high that if I let my
> computer work at this until after next Christmas it will finally give up
> let me through?  
	The "timeout" should be ~1min 15 seconds but this is not something
	has any control over. If you try to connect to any randon IP (that
is not listening)
	there will be no response to the initial SYN packet and that thread
will hang for
	1min 15seconds. There is nothing you can do about it.

> Or is this a problem with my little code edit.
	Not really.

> Or is this simply another unintended side effect?
	You're running 100 threads that try to contact hosts that do not
exist so the
	threads are hanging. They will not hang "until after next Christmas"
but jCIFS
	is not ideal for port scanning of random IPs (or Java in general for
that matter).


More information about the jcifs mailing list