예제 #1
0
 public override byte[] GetParameters(bool isUnicode)
 {
     byte[] parameters = new byte[ParametersLength];
     LittleEndianWriter.WriteUInt16(parameters, 0, FID);
     LittleEndianWriter.WriteUInt16(parameters, 2, (ushort)FileAttributes);
     UTimeHelper.WriteUTime(parameters, 4, CreationTime);
     LittleEndianWriter.WriteUInt32(parameters, 8, FileDataSize);
     AccessMode.WriteBytes(parameters, 12);
     LittleEndianWriter.WriteUInt16(parameters, 14, (ushort)ResourceType);
     NMPipeStatus.WriteBytes(parameters, 16);
     ActionTaken.WriteBytes(parameters, 18);
     LittleEndianWriter.WriteUInt32(parameters, 20, Reserved);
     LittleEndianWriter.WriteUInt16(parameters, 24, ExtendedAttributeErrorOffset);
     LittleEndianWriter.WriteUInt32(parameters, 26, ExtendedAttributeLength);
     return(parameters);
 }
예제 #2
0
        public override byte[] GetBytes(bool isUnicode)
        {
            this.SMBParameters = new byte[ParametersLength];
            int parametersOffset = 4;

            LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, FID);
            LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, (ushort)FileAttrs);
            UTimeHelper.WriteUTime(this.SMBParameters, ref parametersOffset, LastWriteTime);
            LittleEndianWriter.WriteUInt32(this.SMBParameters, ref parametersOffset, FileDataSize);
            LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, (ushort)AccessRights);
            LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, (ushort)ResourceType);
            NMPipeStatus.WriteBytes(this.SMBParameters, ref parametersOffset);
            OpenResults.WriteBytes(this.SMBParameters, ref parametersOffset);
            ByteWriter.WriteBytes(this.SMBParameters, ref parametersOffset, Reserved, 6);
            return(base.GetBytes(isUnicode));
        }
예제 #3
0
        public override byte[] GetBytes(bool isUnicode)
        {
            this.SMBParameters = new byte[ParametersLength];
            int parametersOffset = 4;

            ByteWriter.WriteByte(this.SMBParameters, ref parametersOffset, (byte)OpLockLevel);
            LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, FID);
            LittleEndianWriter.WriteUInt32(this.SMBParameters, ref parametersOffset, (uint)CreateDisposition);
            FileTimeHelper.WriteFileTime(this.SMBParameters, ref parametersOffset, CreateTime);
            FileTimeHelper.WriteFileTime(this.SMBParameters, ref parametersOffset, LastAccessTime);
            FileTimeHelper.WriteFileTime(this.SMBParameters, ref parametersOffset, LastWriteTime);
            FileTimeHelper.WriteFileTime(this.SMBParameters, ref parametersOffset, LastChangeTime);
            LittleEndianWriter.WriteUInt32(this.SMBParameters, ref parametersOffset, (uint)ExtFileAttributes);
            LittleEndianWriter.WriteInt64(this.SMBParameters, ref parametersOffset, AllocationSize);
            LittleEndianWriter.WriteInt64(this.SMBParameters, ref parametersOffset, EndOfFile);
            LittleEndianWriter.WriteUInt16(this.SMBParameters, ref parametersOffset, (ushort)ResourceType);
            NMPipeStatus.WriteBytes(this.SMBParameters, ref parametersOffset);
            ByteWriter.WriteByte(this.SMBParameters, ref parametersOffset, Convert.ToByte(Directory));
            return(base.GetBytes(isUnicode));
        }
 public override byte[] GetParameters(bool isUnicode)
 {
     byte[] parameters = new byte[2];
     NMPipeStatus.WriteBytes(parameters, 0);
     return(parameters);
 }