Skip to content

Commit

Permalink
chore: update commonlib (#110)
Browse files Browse the repository at this point in the history
chore: skip base labelled items
chore: bump version
  • Loading branch information
rvazarkar authored Jul 31, 2024
1 parent 773cc2f commit 0bf98fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Sharphound.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<LangVersion>latest</LangVersion>
<DebugType>full</DebugType>
<ApplicationIcon>favicon.ico</ApplicationIcon>
<Version>2.5.3</Version>
<FileVersion>2.5.3</FileVersion>
<Version>2.5.4</Version>
<FileVersion>2.5.4</FileVersion>
<Company>SpecterOps</Company>
<Product>SharpHound</Product>
<AssemblyName>SharpHound</AssemblyName>
Expand All @@ -24,8 +24,8 @@
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="SharpHoundCommon" Version="4.0.3" />
<PackageReference Include="SharpHoundRPC" Version="4.0.3" />
<PackageReference Include="SharpHoundCommon" Version="4.0.4" />
<PackageReference Include="SharpHoundRPC" Version="4.0.4" />
<PackageReference Include="SharpZipLib" Version="1.3.3" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Threading.Channels" Version="8.0.0" />
Expand Down
8 changes: 6 additions & 2 deletions src/Runtime/LDAPConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Extensions.Logging;
using Sharphound.Client;
using SharpHoundCommonLib;
using SharpHoundCommonLib.Enums;
using SharpHoundCommonLib.OutputTypes;

namespace Sharphound.Runtime
Expand All @@ -24,11 +25,14 @@ internal static async Task ConsumeSearchResults(Channel<IDirectoryObject> inputC
await foreach (var item in inputChannel.Reader.ReadAllAsync())
try
{
if (await LdapUtils.ResolveSearchResult(item, context.LDAPUtils) is not (true, var res) || res == null) {
if (await LdapUtils.ResolveSearchResult(item, context.LDAPUtils) is not (true, var res) || res == null || res.ObjectType == Label.Base) {
if (item.TryGetDistinguishedName(out var dn)) {
log.LogTrace("Consumer failed to resolve entry for {item} or label was Base", dn);
}
continue;
}

log.LogTrace("Consumer {ThreadID} started processing {obj}", threadId, res.DisplayName);
log.LogTrace("Consumer {ThreadID} started processing {obj} ({type})", threadId, res.DisplayName, res.ObjectType);
watch.Start();
var processed = await processor.ProcessObject(item, res, computerStatusChannel);
watch.Stop();
Expand Down

0 comments on commit 0bf98fd

Please sign in to comment.