[jcifs] problem browsing smb:// on another subnet (second version)
Gary Rambo
c-grambo at aventail.com
Sun Nov 23 10:40:13 EST 2003
[Sorry; bad formatting on the first try]
I'm trying to browse the network neighborhood on a different subnet using a version of ListFiles.java modified to specify the local interface, the default domain, the WINS server on the target subnet, and restricting the resolveOrder to "WINS".
What I want to do is enumerate domains using the WINS server; but what happens is, without contacting the WINS server on the target subnet, I'm broadcasting on 137 for __MSBROWSE__ and getting a response from a browser on the local subnet, to which I can't authenticate (and which won't accept GUEST or anonymous either).
Is there a way to accomplish what I'm after?
Thanks.
Gary
[I've attached the Jcifs configuration at startup and the tcpdump
summary]
-------------- next part --------------
[15:33:25-877] DEBUG jcifs.smb.client.domain................................SPUD
[15:33:25-877] DEBUG jcifs.netbios.wins.....................................192.168.1.40
[15:33:25-877] DEBUG jcifs.netbios.baddr....................................192.168.1.255
[15:33:25-878] DEBUG jcifs.encoding.........................................null
[15:33:25-878] DEBUG jcifs.resolveOrder.....................................WINS
[15:33:25-878] DEBUG jcifs.util.log.........................................null
[15:33:25-878] DEBUG jcifs.netbios.hostname.................................null
[15:33:25-878] DEBUG jcifs.netbios.laddr....................................192.168.136.181
[15:33:25-878] DEBUG jcifs.netbios.lmhosts..................................null
[15:33:25-878] DEBUG jcifs.netbios.scope....................................null
[15:33:25-879] DEBUG jcifs.smb.client.laddr.................................192.168.136.181
[15:33:25-879] DEBUG jcifs.smb.client.nativeLanMan..........................null
[15:33:25-879] DEBUG jcifs.smb.client.serviceType...........................null
[15:33:25-879] DEBUG jcifs.smb.client.listCount.............................null
[15:33:25-879] DEBUG jcifs.smb.client.listSize..............................null
[15:33:25-880] DEBUG jcifs.smb.client.lport.................................null
[15:33:25-880] DEBUG jcifs.smb.client.responseTimeout.......................null
[15:33:25-880] DEBUG jcifs.smb.client.soTimeout.............................null
[15:33:25-880] DEBUG jcifs.netbios.lport....................................null
[15:33:25-880] DEBUG jcifs.netbios.retryTimeout.............................null
[15:33:25-880] DEBUG jcifs.netbios.cachePolicy..............................null
[15:33:25-880] DEBUG jcifs.netbios.client.writeSize.........................null
[15:33:25-881] DEBUG jcifs.netbios.soTimeout................................null
[15:33:25-881] DEBUG jcifs.smb.client.attrExpirationPeriod..................null
[15:33:25-881] DEBUG jcifs.smb.client.capabilities..........................null
[15:33:25-881] DEBUG jcifs.smb.client.flags2................................null
[15:33:25-881] DEBUG jcifs.smb.client.maxMpxCount...........................null
[15:33:25-881] DEBUG jcifs.smb.client.rcv_buf_size..........................null
[15:33:25-881] DEBUG jcifs.smb.client.disablePlainTextPasswords.............null
[15:33:25-882] DEBUG jcifs.smb.client.tcpNoDelay............................null
[15:33:25-882] DEBUG jcifs.smb.client.useBatching...........................null
[15:33:25-882] DEBUG jcifs.smb.client.useUnicode............................null
-------------- next part --------------
No. Time Source Destination Protocol Info
1 0.000000 192.168.136.181 255.255.255.255 NBNS Name query NB <01><02>__MSBROWSE__<02><01>
2 0.000429 192.168.136.76 192.168.136.181 NBNS Name query response NB 192.168.136.76
3 0.049235 192.168.136.181 192.168.136.76 TCP 60811 > netbios-ssn [SYN] Seq=2078461900 Ack=0 Win=5840 Len=0
4 0.049525 192.168.136.76 192.168.136.181 TCP netbios-ssn > 60811 [SYN, ACK] Seq=2088050172 Ack=2078461901 Win=5792 Len=0
5 0.049548 192.168.136.181 192.168.136.76 TCP 60811 > netbios-ssn [ACK] Seq=2078461901 Ack=2088050173 Win=5840 Len=0
6 0.051520 192.168.136.181 192.168.136.76 NBSS Session request, to *SMBSERVER<20> from JCIFS136_181_2D<00>
7 0.051899 192.168.136.76 192.168.136.181 TCP netbios-ssn > 60811 [ACK] Seq=2088050173 Ack=2078461973 Win=5720 Len=0
8 0.057519 192.168.136.76 192.168.136.181 NBSS Positive session response
9 0.057530 192.168.136.181 192.168.136.76 TCP 60811 > netbios-ssn [ACK] Seq=2078461973 Ack=2088050177 Win=5840 Len=0
10 0.059344 192.168.136.181 192.168.136.76 SMB Negotiate Protocol Request
11 0.060142 192.168.136.76 192.168.136.181 SMB Negotiate Protocol Response
12 0.066131 192.168.136.181 192.168.136.76 SMB Session Setup AndX Request, User: SPUD\GUEST; Tree Connect AndX, Path: \\192.168.136.76\IPC$
13 0.070386 192.168.136.76 192.168.136.181 SMB Session Setup AndX Response, Error: Bad password
14 0.074006 192.168.136.181 192.168.136.76 SMB Session Setup AndX Request, User: anonymous; Tree Connect AndX, Path: \\192.168.136.76\IPC$
15 0.076632 192.168.136.76 192.168.136.181 SMB Session Setup AndX Response, Error: Bad password
16 0.096230 192.168.136.181 192.168.136.76 TCP 60811 > netbios-ssn [FIN, ACK] Seq=2078462271 Ack=2088050343 Win=5840 Len=0
17 0.106615 192.168.136.76 192.168.136.181 TCP netbios-ssn > 60811 [FIN, ACK] Seq=2088050343 Ack=2078462272 Win=5421 Len=0
18 0.106632 192.168.136.181 192.168.136.76 TCP 60811 > netbios-ssn [ACK] Seq=2078462272 Ack=2088050344 Win=5840 Len=0
More information about the jcifs
mailing list