Exemple #1
0
    public EfsRpcCloseRawResponse(byte[] buffer)
    {
        NDRParser parser = new NDRParser(buffer);

        Handle = new EXImportContextHandle();
        parser.ReadStructure(Handle);
    }
    public EfsRpcOpenFileRawResponse(byte[] buffer)
    {
        NDRParser parser = new NDRParser(buffer);

        ContextHandle = new EXImportContextHandle();
        parser.ReadStructure(ContextHandle);
        Return = parser.ReadUInt32();
    }
        public static void EfsRpcCloseRaw(RPCCallHelper rpc, ref EXImportContextHandle handle, out NTStatus status)
        {
            EfsRpcCloseRawRequest closeRequest = new EfsRpcCloseRawRequest();

            closeRequest.handle = handle;

            EfsRpcCloseRawResponse closeResponse;

            status = rpc.ExecuteCall((ushort)LsaRemoteServiceOpName.LsarClose, closeRequest, out closeResponse);
            if (status != NTStatus.STATUS_SUCCESS)
            {
                return;
            }
            handle = closeResponse.Handle;
        }
        public static UInt32 EfsRpcOpenFileRaw(RPCCallHelper rpc, out EXImportContextHandle hContext, string FileName, Int32 Flags, out NTStatus status)
        {
            EfsRpcOpenFileRawRequest openFileRequest = new EfsRpcOpenFileRawRequest();

            openFileRequest.FileName = FileName;
            openFileRequest.Flags    = Flags;

            EfsRpcOpenFileRawResponse openFileResponse;

            status = rpc.ExecuteCall((ushort)EFSServiceOpName.EfsRpcOpenFileRaw, openFileRequest, out openFileResponse);
            if (status != NTStatus.STATUS_SUCCESS)
            {
                hContext = new EXImportContextHandle();
                return(0);
            }
            hContext = openFileResponse.ContextHandle;
            return(openFileResponse.Return);
        }