Skip to content

Commit

Permalink
chore: fix namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
rvazarkar committed Feb 11, 2025
1 parent 79333e2 commit e96438f
Show file tree
Hide file tree
Showing 21 changed files with 16 additions and 25 deletions.
1 change: 1 addition & 0 deletions src/CommonLib/LdapUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ await GetDomainSidFromDomainName(forestName) is (true, var forestDomainSid)) {

foreach (var f in grouped) {
if (!forestSidToName.TryGetValue(f.Key, out var forestName)) {
_log.LogWarning("Could not get a mapped value for well known principal {Key}", f.Key);
continue;
}

Expand Down
6 changes: 3 additions & 3 deletions src/CommonLib/Ntlm/HttpNtlmAuthenticationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public async Task EnsureRequiresAuth(Uri url, bool? useBadChannelBindings) {

foreach (var authScheme in supportedAuthSchemes) {
if (useBadChannelBindings == null) {
await AuthWithBadChannelBindings(url, authScheme);
await AuthWithBadChannelBindingsAsync(url, authScheme);
} else {
if ((bool)useBadChannelBindings) {
await AuthWithBadChannelBindings(url, authScheme);
await AuthWithBadChannelBindingsAsync(url, authScheme);
} else {
await AuthWithChannelBindingAsync(url, authScheme);
}
Expand Down Expand Up @@ -88,7 +88,7 @@ private string[] ExtractAuthSchemes(HttpResponseMessage response) {
return schemes;
}

private async Task AuthWithBadChannelBindings(Uri url, string authScheme) {
private async Task AuthWithBadChannelBindingsAsync(Uri url, string authScheme) {
var httpClient = _httpClientFactory.CreateUnauthenticatedClient();
var transport = new HttpTransport(httpClient, url, authScheme, _logger);
var ntlmAuthHandler = new NtlmAuthenticationHandler($"HTTP/{url.Host}");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace SharpHoundCommonLib.OutputTypes.APIResult {
namespace SharpHoundCommonLib.OutputTypes {
public class APIResult {
public bool Collected { get; set; }
public string FailureReason { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SharpHoundCommonLib.OutputTypes
{
public class AceRegistryAPIResult : APIResult.APIResult
public class AceRegistryAPIResult : APIResult
{
public ACE[] Data { get; set; } = Array.Empty<ACE>();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SharpHoundCommonLib.OutputTypes
{
public class BoolRegistryAPIResult : APIResult.APIResult
public class BoolRegistryAPIResult : APIResult
{
public bool Value { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SharpHoundCommonLib.OutputTypes;

public class CAEnrollmentAPIResult : APIResult.APIResult{
public class CAEnrollmentAPIResult : APIResult{
public CAEnrollmentEndpoint Result { get; set; }

public static CAEnrollmentAPIResult Fail(string error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SharpHoundCommonLib.OutputTypes
{
public class EnrollmentAgentRegistryAPIResult : APIResult.APIResult
public class EnrollmentAgentRegistryAPIResult : APIResult
{
public EnrollmentAgentRestriction[] Restrictions { get; set; } = Array.Empty<EnrollmentAgentRestriction>();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SharpHoundCommonLib.OutputTypes
{
public class IntRegistryAPIResult : APIResult.APIResult
public class IntRegistryAPIResult : APIResult
{
public int Value { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SharpHoundCommonLib.OutputTypes
{
public class LSAPrivilegeAPIResult : APIResult.APIResult
public class LSAPrivilegeAPIResult : APIResult
{
public TypedPrincipal[] Results { get; set; } = Array.Empty<TypedPrincipal>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SharpHoundCommonLib.OutputTypes
{
public class LocalGroupAPIResult : APIResult.APIResult
public class LocalGroupAPIResult : APIResult
{
public string ObjectIdentifier { get; set; }
public string Name { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SharpHoundCommonLib.OutputTypes
{
public class SessionAPIResult : APIResult.APIResult
public class SessionAPIResult : APIResult
{
public Session[] Results { get; set; } = Array.Empty<Session>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SharpHoundCommonLib.OutputTypes
{
public class UserRightsAssignmentAPIResult : APIResult.APIResult
public class UserRightsAssignmentAPIResult : APIResult
{
public string Privilege { get; set; }
public TypedPrincipal[] Results { get; set; } = Array.Empty<TypedPrincipal>();
Expand Down
3 changes: 1 addition & 2 deletions src/CommonLib/OutputTypes/CARegistryData.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using SharpHoundCommonLib.OutputTypes.APIResult;
using SharpHoundCommonLib.Processors;
using SharpHoundCommonLib.Processors;

namespace SharpHoundCommonLib.OutputTypes
{
Expand Down
1 change: 0 additions & 1 deletion src/CommonLib/OutputTypes/Computer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using SharpHoundCommonLib.OutputTypes.APIResult;

namespace SharpHoundCommonLib.OutputTypes {
/// <summary>
Expand Down
4 changes: 1 addition & 3 deletions src/CommonLib/OutputTypes/EnterpriseCA.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using SharpHoundCommonLib.OutputTypes.APIResult;

namespace SharpHoundCommonLib.OutputTypes
namespace SharpHoundCommonLib.OutputTypes
{
public class EnterpriseCA : OutputBase
{
Expand Down
1 change: 0 additions & 1 deletion src/CommonLib/Processors/CAEnrollmentProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Net.Http;
using System.Net.Sockets;
using System.Threading.Tasks;
using SharpHoundCommonLib.OutputTypes.APIResult;

namespace SharpHoundCommonLib.Processors {
/// <summary>
Expand Down
1 change: 0 additions & 1 deletion src/CommonLib/Processors/DCLdapProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using SharpHoundCommonLib.OutputTypes.APIResult;

namespace SharpHoundCommonLib.Processors;

Expand Down
1 change: 0 additions & 1 deletion src/CommonLib/Processors/EventLogProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Threading.Tasks;
using SharpHoundCommonLib.OutputTypes;
using System.Net;
using SharpHoundCommonLib.OutputTypes.APIResult;

namespace SharpHoundCommonLib.Processors {
[Flags]
Expand Down
1 change: 0 additions & 1 deletion src/CommonLib/Processors/RegistryResult.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using SharpHoundCommonLib.OutputTypes;
using SharpHoundCommonLib.OutputTypes.APIResult;

namespace SharpHoundCommonLib.Processors {
public class RegistryResult : APIResult {
Expand Down
1 change: 0 additions & 1 deletion src/CommonLib/Processors/SmbProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using SharpHoundCommonLib.OutputTypes.APIResult;

namespace SharpHoundCommonLib.Processors {
/// <summary>
Expand Down
1 change: 0 additions & 1 deletion src/CommonLib/Processors/WebClientServiceProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using SharpHoundCommonLib.OutputTypes.APIResult;

namespace SharpHoundCommonLib.Processors {
/// <summary>
Expand Down

0 comments on commit e96438f

Please sign in to comment.