protected override IEnumerable <CollectedItem> collectDataForSystemItem(ItemType systemItem)
        {
            base.ExecutionLogBuilder.CollectingDataFrom(TargetHostName);
            var collectedPasswordPolicies = PasswordPolicyHelper.getUserModalsInfo0(TargetHostName);

            this.MapPasswrodPolicyToPasswordPolicyItemType((passwordpolicy_item)systemItem, collectedPasswordPolicies);

            return(new ItemTypeHelper().CreateCollectedItemsWithOneItem(systemItem, base.BuildExecutionLog()));
        }
Exemplo n.º 2
0
        private void MapLockoutPoliciesToLockoutItemType(lockoutpolicy_item lockoutItemType, PasswordPolicyHelper.USER_MODALS_INFO_3 policies)
        {
            var duration = policies.usrmod3_lockout_duration.ToString();
            var observationWindows = policies.usrmod3_lockout_observation_window.ToString();
            var threshold = policies.usrmod3_lockout_threshold.ToString();

            lockoutItemType.lockout_duration = OvalHelper.CreateItemEntityWithIntegerValue(duration);
            lockoutItemType.lockout_observation_window = OvalHelper.CreateItemEntityWithIntegerValue(observationWindows);
            lockoutItemType.lockout_threshold = OvalHelper.CreateItemEntityWithIntegerValue(threshold);
        }
Exemplo n.º 3
0
        private void MapPasswrodPolicyToPasswordPolicyItemType(passwordpolicy_item passwordItemType, PasswordPolicyHelper.USER_MODALS_INFO_0 passwordPolicies)
        {
            var maxPasswordAge = passwordPolicies.usrmod0_max_passwd_age.ToString();
            var minPasswordAge = passwordPolicies.usrmod0_min_passwd_age.ToString();
            var minPasswordLength = passwordPolicies.usrmod0_min_passwd_len.ToString();
            var passwordHistoryLength = passwordPolicies.usrmod0_password_hist_len.ToString();

            passwordItemType.max_passwd_age = OvalHelper.CreateItemEntityWithIntegerValue(maxPasswordAge);
            passwordItemType.min_passwd_age = OvalHelper.CreateItemEntityWithIntegerValue(minPasswordAge);
            passwordItemType.min_passwd_len = OvalHelper.CreateItemEntityWithIntegerValue(minPasswordLength);
            passwordItemType.password_hist_len = OvalHelper.CreateItemEntityWithIntegerValue(passwordHistoryLength);
        }
Exemplo n.º 4
0
        protected override IEnumerable <CollectedItem> collectDataForSystemItem(ItemType systemItem)
        {
            base.ExecutionLogBuilder.CollectingDataFrom(TargetHostName);
            var collectedPasswordPolicies = PasswordPolicyHelper.getUserModalsInfo0(TargetHostName);

            this.MapPasswrodPolicyToPasswordPolicyItemType((passwordpolicy_item)systemItem, collectedPasswordPolicies);

            PasswordPolicySamServer.DomainPasswordInformation?domainPasswordInfo;
            try
            {
                domainPasswordInfo = PasswordPolicySamServer.GetDomainPasswordInformation(TargetHostName);
            }
            catch
            {
                domainPasswordInfo = null;
            }

            MapDomainPasswrodInformationToPasswordPolicyItemType((passwordpolicy_item)systemItem, domainPasswordInfo);

            return(new ItemTypeHelper().CreateCollectedItemsWithOneItem(systemItem, base.BuildExecutionLog()));
        }