
jcifs_1.3.3.examples.GetServerSidFromURL Maven / Gradle / Ivy
Go to download
JCIFS is an Open Source client library that implements the CIFS/SMB networking protocol in 100% Java
The newest version!
import java.util.*;
import jcifs.smb.*;
public class GetServerSidFromURL {
public static void main( String[] argv ) throws Exception {
if (argv.length < 1) {
System.err.println("usage: GetServerSidFromURL ");
System.exit(1);
}
SmbFile file = new SmbFile(argv[0]);
String server = file.getServer();
NtlmPasswordAuthentication auth = (NtlmPasswordAuthentication)file.getPrincipal();
SID serverSid = SID.getServerSid(server, auth);
System.out.println(serverSid);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy