示例#1
0
        public void GetSMB()
        {
            List <SearchString> smbSearchStringList = buildSearchString.GetSMBSearchString();

            foreach (var smbSearchString in smbSearchStringList)
            {
                IDisplay displayer = new DisplayFileObjects();
                displayer.DisplayTitle(smbSearchString.Title);
                if (!CanConnectSYSVOL)
                {
                    continue;
                }

                var sysvol = AsyncCollection.GetSYSVOLAsync(smbSearchString).Result;

                if (sysvol.Count == 0)
                {
                    continue;
                }
                foreach (var file in sysvol)
                {
                    displayer.DisplayResult(file);
                }
            }
        }
示例#2
0
        public void GetGPP()
        {
            IDisplay displayer       = new DisplayFileObjects();
            var      gppSearchString = new SMBSearchString
            {
                Title          = "Group Policy Preference Passwords",
                FileAttributes = new List <string> {
                    "cpassword"
                }
            };

            displayer.DisplayTitle(gppSearchString.Title);
            if (!CanConnectSYSVOL)
            {
                return;
            }

            var xmlFileList = AsyncCollection.GetGPPXML().Result;

            gppSearchString.FilePathList = xmlFileList;
            var sysvol = AsyncCollection.GetSYSVOLAsync(gppSearchString).Result;

            if (sysvol.Count == 0)
            {
                return;
            }
            foreach (var file in sysvol)
            {
                displayer.DisplayResult(file);
            }
        }