Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackndo committed Feb 3, 2024
1 parent 8edfc19 commit 0cb98e0
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/CommonLib/Processors/GPOLmCompatibilityLevelProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.DirectoryServices.Protocols;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml.XPath;
using Microsoft.Extensions.Logging;
using SharpHoundCommonLib.Enums;
using SharpHoundCommonLib.LDAPQueries;
using SharpHoundCommonLib.OutputTypes;

namespace SharpHoundCommonLib.Processors
{
Expand Down Expand Up @@ -51,17 +46,16 @@ public async Task<Boolean> ReadGPOLmCompatibilityLevel(string gpDn)
return false;
}


//Add the actions for each file. The GPO template file actions will override the XML file actions
return await ProcessGPOTemplateFile(filePath);
}

/// <summary>
/// Parses a GPO GptTmpl.inf file and pulls group membership changes out
/// Parses a GPO GptTmpl.inf file and grep lmcompatibilitylevel value
/// </summary>
/// <param name="basePath"></param>
/// <param name="gpoDomain"></param>
/// <returns></returns>
/// <returns>
/// lmcompatibilitylevel < 3
/// </returns>
internal async Task<Boolean> ProcessGPOTemplateFile(string basePath)
{
var templatePath = Path.Combine(basePath, "MACHINE", "Microsoft", "Windows NT", "SecEdit", "GptTmpl.inf");
Expand Down

0 comments on commit 0cb98e0

Please sign in to comment.