Beispiel #1
0
 public void Write(NDRWriter writer)
 {
     writer.WriteUInt32(part1);
     writer.WriteUInt32(part2);
     writer.WriteUInt32(part3);
     writer.WriteUInt32(part4);
     writer.WriteUInt32(part5);
 }
 public void Write(NDRWriter writer)
 {
     writer.BeginStructure();
     writer.WriteUInt16((ushort)Use);
     writer.WriteUInt32(RelativeId);
     writer.WriteUInt32(DomainIndex);
     writer.EndStructure();
 }
Beispiel #3
0
 public override void Write(NDRWriter writer)
 {
     writer.BeginStructure();
     writer.WriteUInt32(PlatformID);
     writer.WriteEmbeddedStructureFullPointer(ComputerName);
     writer.WriteEmbeddedStructureFullPointer(LanGroup);
     writer.WriteUInt32(VerMajor);
     writer.WriteUInt32(VerMinor);
     writer.EndStructure();
 }
Beispiel #4
0
        public byte[] GetBytes()
        {
            using NDRWriter writer = new NDRWriter();
            writer.WriteStructure(InfoStruct);
            writer.WriteUInt32(TotalEntries);
            writer.WriteUInt32(ResumeHandle);
            writer.WriteUInt32((uint)Result);

            return(writer.GetBytes());
        }
        public byte[] GetBytes()
        {
            using NDRWriter writer = new NDRWriter();
            writer.WriteTopLevelUnicodeStringPointer(ServerName);
            writer.WriteStructure(InfoStruct);
            writer.WriteUInt32(PreferedMaximumLength);
            writer.WriteUInt32(ResumeHandle);

            return(writer.GetBytes());
        }
Beispiel #6
0
 public override void Write(NDRWriter writer)
 {
     writer.BeginStructure();
     writer.WriteUInt32((uint)PlatformID);
     writer.WriteEmbeddedStructureFullPointer(ServerName);
     writer.WriteUInt32(VerMajor);
     writer.WriteUInt32(VerMinor);
     writer.WriteUInt32((uint)Type);
     writer.WriteEmbeddedStructureFullPointer(Comment);
     writer.EndStructure();
 }
    public byte[] GetBytes()
    {
        NDRWriter writer = new NDRWriter();

        writer.BeginStructure();
        writer.WriteTopLevelUnicodeStringPointer(ServerName.StartsWith("\\\\") ? ServerName : "\\\\" + ServerName);
        writer.WriteTopLevelUnicodeStringPointer(Service);
        writer.WriteUInt32(Level);
        writer.WriteUInt32(Options);
        writer.EndStructure();
        return(writer.GetBytes());
    }
Beispiel #8
0
    public byte[] GetBytes()
    {
        NDRWriter writer = new NDRWriter();

        writer.WriteTopLevelUnicodeStringPointer(ServerName);
        writer.WriteTopLevelUnicodeStringPointer(DomainName);
        //guid
        writer.WriteUInt32(0);
        writer.WriteTopLevelUnicodeStringPointer(SiteName);
        writer.WriteUInt32(Flags);
        return(writer.GetBytes());
    }
Beispiel #9
0
 public void Write(NDRWriter writer)
 {
     writer.BeginStructure();
     writer.WriteEmbeddedStructureFullPointer(NetName);
     ShareType.Write(writer);
     writer.WriteEmbeddedStructureFullPointer(Remark);
     writer.WriteUInt32((uint)Permissions);
     writer.WriteUInt32(MaxUses);
     writer.WriteUInt32(CurrentUses);
     writer.WriteEmbeddedStructureFullPointer(Path);
     writer.WriteEmbeddedStructureFullPointer(Password);
     writer.EndStructure();
 }
Beispiel #10
0
        public void Write(NDRWriter writer)
        {
            if (Info != null && Level != Info.Level)
            {
                throw new ArgumentException("Invalid SHARE_ENUM_STRUCT Level");
            }

            writer.BeginStructure(); // SHARE_ENUM_STRUCT
            writer.WriteUInt32(Level);
            writer.BeginStructure(); // SHARE_ENUM_UNION
            writer.WriteUInt32(Info.Level);
            writer.WriteEmbeddedStructureFullPointer(Info);
            writer.EndStructure(); // SHARE_ENUM_UNION
            writer.EndStructure(); // SHARE_ENUM_STRUCT
        }
Beispiel #11
0
 public void Write(NDRWriter writer)
 {
     writer.BeginStructure(); // SHARE_INFO Union
     writer.WriteUInt32(Level);
     writer.WriteEmbeddedStructureFullPointer(Info);
     writer.EndStructure(); // SHARE_INFO Union
 }
Beispiel #12
0
 public void Write(NDRWriter writer)
 {
     writer.BeginStructure();
     writer.WriteUInt32((uint)this.Count);
     writer.WriteEmbeddedStructureFullPointer(Entries);
     writer.EndStructure();
 }
 public void Write(NDRWriter writer)
 {
     writer.BeginStructure();
     writer.WriteUInt32(Entries);
     writer.WriteEmbeddedStructureFullPointer(SIDInfos);
     writer.EndStructure();
 }
Beispiel #14
0
        public byte[] GetBytes()
        {
            using NDRWriter writer = new NDRWriter();
            writer.WriteStructure(InfoStruct);
            writer.WriteUInt32((uint)Result);

            return(writer.GetBytes());
        }
        public byte[] GetBytes()
        {
            using NDRWriter writer = new NDRWriter();
            writer.WriteTopLevelUnicodeStringPointer(ServerName);
            writer.WriteUInt32(Level);

            return(writer.GetBytes());
        }
        public void Write(NDRWriter writer)
        {
            writer.BeginStructure();
            writer.WriteUInt32((uint)(Items == null ? 0 : Items.Count));

            writer.WriteEmbeddedStructureFullPointer(Items);
            writer.EndStructure();
        }
    public byte[] GetBytes()
    {
        NDRWriter writer = new NDRWriter();

        writer.WriteUnicodeString(FileName);
        writer.WriteUInt32((uint)Flags);

        return(writer.GetBytes());
    }
Beispiel #18
0
        public byte[] GetBytes()
        {
            NDRWriter writer = new NDRWriter();

            writer.WriteStructure(WkstaInfo);
            writer.WriteUInt32((uint)Result);

            return(writer.GetBytes());
        }
Beispiel #19
0
        public void Write(NDRWriter writer)
        {
            throw new NotImplementedException();
            writer.BeginStructure();
            writer.WriteUInt32(Entries);

            writer.WriteEmbeddedStructureFullPointer(Names);
            writer.EndStructure();
        }
Beispiel #20
0
 public void Write(NDRWriter writer)
 {
     writer.BeginStructure();
     writer.WriteUInt16((ushort)Use);
     //TODO verifty
     writer.WriteStructure(unicode_string);
     writer.WriteUInt32(DomainIndex);
     writer.EndStructure();
 }
    public byte[] GetBytes()
    {
        NDRWriter writer = new NDRWriter();

        writer.WriteTopLevelUnicodeStringPointer(null);
        writer.WriteStructure(ObjectAttributes);
        writer.WriteUInt32((uint)DesiredAccess);

        return(writer.GetBytes());
    }
Beispiel #22
0
        public void Write(NDRWriter writer)
        {
            if (Info != null && Level != Info.Level)
            {
                throw new ArgumentException("Invalid WKSTA_INFO Level");
            }

            writer.BeginStructure();
            writer.WriteUInt32(Level);
            writer.WriteEmbeddedStructureFullPointer(Info);
            writer.EndStructure();
        }
    public byte[] GetBytes()
    {
        NDRWriter writer = new NDRWriter();

        //handle
        writer.WriteStructure(handle);

        writer.WriteUInt32((uint)Names.Count);
        // names array
        writer.WriteStructure(Names);

        //translated sids
        writer.WriteStructure(TranslatedSids);

        //level
        writer.WriteUInt16(LookupLevel);

        // mappedcount
        writer.WriteUInt32(0);
        return(writer.GetBytes());
    }
Beispiel #24
0
        public void Write(NDRWriter writer)
        {
            writer.BeginStructure();
            writer.WriteUInt32((uint)SIDs.Count);
            if (SIDs != null)
            {
                foreach (SID sid in SIDs)
                {
                    NDRSID ndrSid = new NDRSID(sid);
                    writer.WriteEmbeddedStructureFullPointer(ndrSid);
                }
            }

            writer.EndStructure();
        }
Beispiel #25
0
 public void Write(NDRWriter writer)
 {
     writer.BeginStructure();
     writer.WriteUInt32(Length);
     writer.WriteUInt32(0);
     writer.WriteUInt32(0);
     writer.WriteUInt32(Attributes);
     writer.WriteUInt32(0);
     writer.WriteUInt32(0);
     writer.EndStructure();
 }
    public byte[] GetBytes()
    {
        NDRWriter writer = new NDRWriter();

        //handle
        writer.WriteStructure(handle);
        // sid array
        writer.WriteStructure(SIDEnumBuffer);

        //translated names
        writer.WriteStructure(TranslatedNames);

        //level
        writer.WriteUInt16(level);

        // mappedcount
        writer.WriteUInt32(0);
        return(writer.GetBytes());
    }
Beispiel #27
0
 public void Write(NDRWriter writer)
 {
     writer.WriteUInt32(ToUInt32());
 }