Example #1
0
        /// <exception cref="UnknownHostException"></exception>
        /// <exception cref="System.UriFormatException"></exception>
        /// <exception cref="SharpCifs.Dcerpc.DcerpcException"></exception>
        public DcerpcPipeHandle(string url, NtlmPasswordAuthentication auth)
        {
            Binding = ParseBinding(url);
            url     = "smb://" + Binding.Server + "/IPC$/" + Runtime.Substring(Binding.Endpoint
                                                                               , 6);
            string @params = string.Empty;
            string server;
            string address;

            server = (string)Binding.GetOption("server");
            if (server != null)
            {
                @params += "&server=" + server;
            }
            address = (string)Binding.GetOption("address");
            if (server != null)
            {
                @params += "&address=" + address;
            }
            if (@params.Length > 0)
            {
                url += "?" + Runtime.Substring(@params, 1);
            }
            Pipe = new SmbNamedPipe(url, (unchecked (0x2019F) << 16) | SmbNamedPipe.PipeTypeRdwr
                                    | SmbNamedPipe.PipeTypeDceTransact, auth);
        }
		/// <exception cref="System.IO.IOException"></exception>
		internal TransactNamedPipeOutputStream(SmbNamedPipe pipe) : base(pipe, false, (pipe
			.PipeType & unchecked((int)(0xFFFF00FF))) | SmbFile.OExcl)
		{
			this._pipe = pipe;
			_dcePipe = (pipe.PipeType & SmbNamedPipe.PipeTypeDceTransact) == SmbNamedPipe
				.PipeTypeDceTransact;
			_path = pipe.Unc;
		}
 /// <exception cref="System.IO.IOException"></exception>
 internal TransactNamedPipeOutputStream(SmbNamedPipe pipe)
     : base(pipe, false, (pipe.PipeType & unchecked ((int)(0xFFFF00FF))) | SmbFile.OExcl)
 {
     this._pipe = pipe;
     _dcePipe   = (pipe.PipeType & SmbNamedPipe.PipeTypeDceTransact)
                  == SmbNamedPipe.PipeTypeDceTransact;
     _path = pipe.Unc;
 }
 internal TransPeekNamedPipeResponse(SmbNamedPipe pipe)
 {
     this._pipe = pipe;
 }
		internal TransPeekNamedPipeResponse(SmbNamedPipe pipe)
		{
			this._pipe = pipe;
		}