コード例 #1
0
ファイル: ShareEnum.cs プロジェクト: ciamberlini/SMBLibrary
        public void Read(NDRParser parser)
        {
            parser.BeginStructure(); // SHARE_ENUM_STRUCT
            Level = parser.ReadUInt32();
            parser.BeginStructure(); // SHARE_ENUM_UNION
            // 14.3.8 - For a non-encapsulated union, the discriminant is marshalled into the transmitted data stream twice.
            // once as the field or parameter, which is referenced by the switch_is construct, in the procedure argument list;
            // and once as the first part of the union representation.
            uint level = parser.ReadUInt32();

            switch (level)
            {
            case 0:
                ShareInfo0Container info0 = null;
                parser.ReadEmbeddedStructureFullPointer <ShareInfo0Container>(ref info0);
                Info = info0;
                break;

            case 1:
                ShareInfo1Container info1 = null;
                parser.ReadEmbeddedStructureFullPointer <ShareInfo1Container>(ref info1);
                Info = info1;
                break;

            default:
                throw new NotImplementedException();
            }
            parser.EndStructure(); // SHARE_ENUM_UNION
            parser.EndStructure(); // SHARE_ENUM_STRUCT
        }
コード例 #2
0
    public LsarLookupSidsResponse(byte[] buffer)
    {
        NDRParser parser = new NDRParser(buffer);

        parser.BeginStructure();
        parser.ReadEmbeddedStructureFullPointer(ref DomainList);
        parser.EndStructure();

        TranslatedSids = new LsaTranslatedArray <LsaTranslatedName>();
        parser.ReadStructure(TranslatedSids);

        Count = parser.ReadUInt32();

        parser.EndStructure();
    }
コード例 #3
0
 public void Read(NDRParser parser)
 {
     parser.BeginStructure();
     _ = parser.ReadUInt32();
     parser.ReadEmbeddedStructureFullPointer(ref Entries);
     parser.EndStructure();
 }
コード例 #4
0
    public NetrRemoteTODResponse(byte[] buffer)
    {
        NDRParser parser = new NDRParser(buffer);

        parser.BeginStructure();
        parser.ReadEmbeddedStructureFullPointer(ref TimeOfDayInfo);
        parser.EndStructure();
    }
コード例 #5
0
 public void Read(NDRParser parser)
 {
     parser.BeginStructure();
     Use         = (LsaSIDNameUse)parser.ReadUInt16();
     RelativeId  = parser.ReadUInt32();
     DomainIndex = parser.ReadUInt32();
     parser.EndStructure();
 }
コード例 #6
0
    public NetrServerStatisticsGetResponse(byte[] buffer)
    {
        NDRParser parser = new NDRParser(buffer);

        parser.BeginStructure();
        parser.ReadEmbeddedStructureFullPointer(ref StatServer);
        parser.EndStructure();
    }
コード例 #7
0
        public void Read(NDRParser parser)
        {
            parser.BeginStructure();
            uint count = parser.ReadUInt32();

            parser.ReadEmbeddedStructureFullPointer <NDRConformantArray <ShareInfo0Entry> >(ref Entries);
            parser.EndStructure();
        }
コード例 #8
0
    public DsrGetDcNameResponse(byte[] buffer)
    {
        NDRParser parser = new NDRParser(buffer);

        parser.BeginStructure();
        parser.ReadEmbeddedStructureFullPointer(ref DCInfo);
        parser.EndStructure();
    }
コード例 #9
0
        public void Read(NDRParser parser)
        {
            parser.BeginStructure();
            uint itemCount = parser.ReadUInt32();

            parser.ReadEmbeddedStructureFullPointer(ref Items);
            parser.EndStructure();
        }
コード例 #10
0
ファイル: ShareInfo1Entry.cs プロジェクト: Ozytis/SMBLibrary
 public void Read(NDRParser parser)
 {
     parser.BeginStructure();
     parser.ReadEmbeddedStructureFullPointer(ref NetName);
     ShareType = new ShareTypeExtended(parser);
     parser.ReadEmbeddedStructureFullPointer(ref Remark);
     parser.EndStructure();
 }
コード例 #11
0
        public void Read(NDRParser parser)
        {
            parser.BeginStructure();
            Use = (LsaSIDNameUse)parser.ReadUInt32();

            parser.ReadStructure(unicode_string);
            DomainIndex = parser.ReadUInt32();
            parser.EndStructure();
        }
コード例 #12
0
        public void Read(NDRParser parser)
        {
            parser.BeginStructure();
            parser.ReadStructure(unicode_string);
            Sid = new SID();
            NDRSID NDRSid = new NDRSID(Sid);

            parser.ReadEmbeddedStructureFullPointer(ref NDRSid);
            parser.EndStructure();
        }
コード例 #13
0
        public void Read(NDRParser parser)
        {
            parser.BeginStructure();
            Entries = parser.ReadUInt32();

            Names = new NDRConformantArray <LsaTrustInformation>();
            parser.ReadEmbeddedStructureFullPointer(ref Names);
            MaxEntries = parser.ReadUInt32();
            parser.EndStructure();
        }
コード例 #14
0
 public override void Read(NDRParser parser)
 {
     // If an array, structure, or union embeds a pointer, the representation of the referent of the
     // pointer is deferred to a position in the octet stream that follows the representation of the
     // embedding construction
     parser.BeginStructure();
     PlatformID = (PlatformName)parser.ReadUInt32();
     parser.ReadEmbeddedStructureFullPointer(ref ServerName);
     parser.EndStructure();
 }
コード例 #15
0
ファイル: WorkstationInfo101.cs プロジェクト: gonsovsky/dnSvc
 public override void Read(NDRParser parser)
 {
     parser.BeginStructure();
     PlatformID = parser.ReadUInt32();
     parser.ReadEmbeddedStructureFullPointer(ref ComputerName);
     parser.ReadEmbeddedStructureFullPointer(ref LanGroup);
     VerMajor = parser.ReadUInt32();
     VerMinor = parser.ReadUInt32();
     parser.ReadEmbeddedStructureFullPointer(ref LanRoot);
     parser.EndStructure();
 }
コード例 #16
0
 public void Read(NDRParser parser)
 {
     parser.BeginStructure();
     parser.ReadEmbeddedStructureFullPointer(ref NetName);
     ShareType = new ShareTypeExtended(parser);
     parser.ReadEmbeddedStructureFullPointer(ref Remark);
     Permissions = (Permissions)parser.ReadUInt32();
     MaxUses     = parser.ReadUInt32();
     CurrentUses = parser.ReadUInt32();
     parser.ReadEmbeddedStructureFullPointer(ref Path);
     parser.ReadEmbeddedStructureFullPointer(ref Password);
     parser.EndStructure();
 }
コード例 #17
0
        public void Read(NDRParser parser)
        {
            parser.BeginStructure();
            parser.ReadEmbeddedStructureFullPointer(ref DomainControllerName);
            parser.ReadEmbeddedStructureFullPointer(ref DomainControllerAddress);
            DomainControllerAddressType = parser.ReadUInt32();

            DomainGuid = new Guid(parser.ReadBytes(16));

            parser.ReadEmbeddedStructureFullPointer(ref DomainName);
            parser.ReadEmbeddedStructureFullPointer(ref DnsForestName);

            Flags = parser.ReadUInt32();
            parser.ReadEmbeddedStructureFullPointer(ref DcSiteName);
            parser.ReadEmbeddedStructureFullPointer(ref ClientSiteName);

            parser.EndStructure();
        }
コード例 #18
0
        public void Read(NDRParser parser)
        {
            parser.BeginStructure();

            tod_elapsedt  = parser.ReadUInt32();
            tod_msecs     = parser.ReadUInt32();
            tod_hours     = parser.ReadUInt32();
            tod_mins      = parser.ReadUInt32();
            tod_secs      = parser.ReadUInt32();
            tod_hunds     = parser.ReadUInt32();
            tod_timezone  = parser.ReadUInt32();
            tod_tinterval = parser.ReadUInt32();
            tod_day       = parser.ReadUInt32();
            tod_month     = parser.ReadUInt32();
            tod_year      = parser.ReadUInt32();
            tod_weekday   = parser.ReadUInt32();
            parser.EndStructure();
        }
コード例 #19
0
 public void Read(NDRParser parser)
 {
     parser.BeginStructure();
     sts0_start          = parser.ReadUInt32();
     sts0_fopens         = parser.ReadUInt32();
     sts0_devopens       = parser.ReadUInt32();
     sts0_jobsqueued     = parser.ReadUInt32();
     sts0_sopens         = parser.ReadUInt32();
     sts0_stimedout      = parser.ReadUInt32();
     sts0_serrorout      = parser.ReadUInt32();
     sts0_pwerrors       = parser.ReadUInt32();
     sts0_permerrors     = parser.ReadUInt32();
     sts0_syserrors      = parser.ReadUInt32();
     sts0_bytessent_low  = parser.ReadUInt32();
     sts0_bytessent_high = parser.ReadUInt32();
     sts0_bytesrcvd_low  = parser.ReadUInt32();
     sts0_bytesrcvd_high = parser.ReadUInt32();
     sts0_avresponse     = parser.ReadUInt32();
     sts0_reqbufneed     = parser.ReadUInt32();
     sts0_bigbufneed     = parser.ReadUInt32();
     parser.EndStructure();
 }
コード例 #20
0
ファイル: WorkstationInfo.cs プロジェクト: SonnyX/SMB-Client
        public void Read(NDRParser parser)
        {
            parser.BeginStructure();
            Level = parser.ReadUInt32();
            switch (Level)
            {
            case 100:
                WorkstationInfo100?info100 = null;
                parser.ReadEmbeddedStructureFullPointer(ref info100);
                Info = info100;
                break;

            case 101:
                WorkstationInfo101?info101 = null;
                parser.ReadEmbeddedStructureFullPointer(ref info101);
                Info = info101;
                break;

            default:
                throw new NotImplementedException();
            }
            parser.EndStructure();
        }
コード例 #21
0
ファイル: ShareInfo.cs プロジェクト: Ozytis/SMBLibrary
        public void Read(NDRParser parser)
        {
            parser.BeginStructure(); // SHARE_INFO Union
            Level = parser.ReadUInt32();
            switch (Level)
            {
            case 100:
                ShareInfo0Entry info0 = null;
                parser.ReadEmbeddedStructureFullPointer <ShareInfo0Entry>(ref info0);
                Info = info0;
                break;

            case 101:
                ShareInfo1Entry info1 = null;
                parser.ReadEmbeddedStructureFullPointer <ShareInfo1Entry>(ref info1);
                Info = info1;
                break;

            default:
                throw new NotImplementedException();
            }
            parser.EndStructure(); // SHARE_INFO Union
        }
コード例 #22
0
        public void Read(NDRParser parser)
        {
            parser.BeginStructure(); // SERVER_INFO Union
            Level = parser.ReadUInt32();
            switch (Level)
            {
            case 100:
                ServerInfo100 info100 = null;
                parser.ReadEmbeddedStructureFullPointer <ServerInfo100>(ref info100);
                Info = info100;
                break;

            case 101:
                ServerInfo101 info101 = null;
                parser.ReadEmbeddedStructureFullPointer <ServerInfo101>(ref info101);
                Info = info101;
                break;

            default:
                throw new NotImplementedException();
            }
            ;
            parser.EndStructure(); // SERVER_INFO Union
        }
コード例 #23
0
ファイル: ShareInfo0Entry.cs プロジェクト: Ozytis/SMBLibrary
 public void Read(NDRParser parser)
 {
     parser.BeginStructure();
     parser.ReadEmbeddedStructureFullPointer(ref NetName);
     parser.EndStructure();
 }