File: MultiLogon.java

package info (click to toggle)
jcifs 1.3.16-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,856 kB
  • sloc: java: 23,124; xml: 3,663; ansic: 386; sh: 170; makefile: 26
file content (21 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import jcifs.smb.*;

public class MultiLogon {

    public static void main( String argv[] ) throws Exception {
        if (argv.length < 1) {
            System.err.println( "usage: Dual <cred1> <cred2> <smburl>\n");
            return;
        }

        NtlmPasswordAuthentication auth1 = new NtlmPasswordAuthentication( argv[0] );
        NtlmPasswordAuthentication auth2 = new NtlmPasswordAuthentication( argv[1] );

        SmbFile f1 = new SmbFile( argv[2], auth1 );
        SmbFile f2 = new SmbFile( argv[2], auth2 );

        f1.exists();
        f2.exists();
    }
}