Skip to content

Commit 0bf98fd

Browse files
authored
chore: update commonlib (#110)
chore: skip base labelled items chore: bump version
1 parent 773cc2f commit 0bf98fd

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Sharphound.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<LangVersion>latest</LangVersion>
77
<DebugType>full</DebugType>
88
<ApplicationIcon>favicon.ico</ApplicationIcon>
9-
<Version>2.5.3</Version>
10-
<FileVersion>2.5.3</FileVersion>
9+
<Version>2.5.4</Version>
10+
<FileVersion>2.5.4</FileVersion>
1111
<Company>SpecterOps</Company>
1212
<Product>SharpHound</Product>
1313
<AssemblyName>SharpHound</AssemblyName>
@@ -24,8 +24,8 @@
2424
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
2525
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
2626
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
27-
<PackageReference Include="SharpHoundCommon" Version="4.0.3" />
28-
<PackageReference Include="SharpHoundRPC" Version="4.0.3" />
27+
<PackageReference Include="SharpHoundCommon" Version="4.0.4" />
28+
<PackageReference Include="SharpHoundRPC" Version="4.0.4" />
2929
<PackageReference Include="SharpZipLib" Version="1.3.3" />
3030
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
3131
<PackageReference Include="System.Threading.Channels" Version="8.0.0" />

src/Runtime/LDAPConsumer.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using Microsoft.Extensions.Logging;
77
using Sharphound.Client;
88
using SharpHoundCommonLib;
9+
using SharpHoundCommonLib.Enums;
910
using SharpHoundCommonLib.OutputTypes;
1011

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

31-
log.LogTrace("Consumer {ThreadID} started processing {obj}", threadId, res.DisplayName);
35+
log.LogTrace("Consumer {ThreadID} started processing {obj} ({type})", threadId, res.DisplayName, res.ObjectType);
3236
watch.Start();
3337
var processed = await processor.ProcessObject(item, res, computerStatusChannel);
3438
watch.Stop();

0 commit comments

Comments
 (0)