Scanning and accessing windows shares

C

Chad

How would you access windows shares through java. I'm trying to set up a
java application that would scan all available windows shares on a certain
range of IPs or a certain subnet.
I have a couple of ideas of how I'd like to implement it, but if anyone
had any suggestions otherwise that'd be great.
My purpose is that my school has taken down a couple of local services
created by students that allow scanning of the network shares due to contact
by the RIAA. But then again, those services were hosted by a central server
containing a database of shared files (much like napster), but there are
programs such as ShareScan where it is not centralized and you can just
search (like any other P2P program). But ShareScan is only available to
Windows users. Also, this sounds like a fun project for someone who is
bored and doesn't feel like passing his classes.
The only program/source I could find that even attempted a similar
purpose was jFTP and it didn't work well at all, it was just ghetto
something fierce. I was going to try to modify the code, but it is a lost
cause. If anyone knows of any other source that attempt the same cause,
that'd help as well.


Thanks
Chad


---------------------------
Chad Teat
Georgia Institute of Technology
College of Computing
b*l*i*ndt$o$ne at hotmail.com
(Take out $ and * for email address)
 
C

Christophe Vanfleteren

Chad said:
How would you access windows shares through java. I'm trying to set up a
java application that would scan all available windows shares on a certain
range of IPs or a certain subnet.
I have a couple of ideas of how I'd like to implement it, but if
anyone
had any suggestions otherwise that'd be great.
My purpose is that my school has taken down a couple of local services
created by students that allow scanning of the network shares due to
contact
by the RIAA. But then again, those services were hosted by a central
server containing a database of shared files (much like napster), but
there are programs such as ShareScan where it is not centralized and you
can just
search (like any other P2P program). But ShareScan is only available to
Windows users. Also, this sounds like a fun project for someone who is
bored and doesn't feel like passing his classes.
The only program/source I could find that even attempted a similar
purpose was jFTP and it didn't work well at all, it was just ghetto
something fierce. I was going to try to modify the code, but it is a lost
cause. If anyone knows of any other source that attempt the same cause,
that'd help as well.

I guess that you could try to use http://jcifs.samba.org/ , as it is a java
implementation of the smb/cifs protocol that is used for windows
filesharing.
 
M

Michael B Allen

I guess that you could try to use http://jcifs.samba.org/ , as it is a
java implementation of the smb/cifs protocol that is used for windows
filesharing.

Your "ghetto" problem probably doesn't have anything to do with jFTP. I
doubt you really looked at the code enough to critisize it either. If you
did, you would have noticed it uses jCIFS for SMB access. JCIFS won't
help you either. In fact I think you're going to have a hard time doing
this with Java at all. If you try to open a socket to an IP that is
routable but nobody is listening you will get no response to the initial
SYN packet and your read() will simply hang for about 1 min 15 sec. There
is *nothing* that you can do about this. Your only recourse is to create
1000s of threads and sockets which will quicky exhaust all of the
resources on your machine.

I suggest you do some homework instead.

Mike (author of jCIFS)
 
C

Chad

Dang dude, chill. By asking this group I was doing my homework. But that's
irrelevant. No reason to flame for an honest question. If Java isn't
efficient for such a use, that's all you have to say. That really sucks
though, I was looking forward to this project.

Chad

--------------------------
Chad
Georgia Institute of Technology
College of Computing
 
T

Thomas Weidenfeller

Chad said:
Dang dude, chill. By asking this group I was doing my homework.

Doing homework includes using your brain. You faild on this part.

/Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top