-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from BloodHoundAD/support-exceptions-in-QueryL…
…DAP-UAR Support exceptions in QueryLDAP methods (user_assignment_rights edition)
- Loading branch information
Showing
9 changed files
with
263 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System; | ||
|
||
namespace SharpHoundCommonLib.Exceptions | ||
{ | ||
public class LDAPQueryException : Exception | ||
{ | ||
public LDAPQueryException() { } | ||
public LDAPQueryException(string message) : base(message) { } | ||
public LDAPQueryException(string message, Exception inner) : base(message, inner) { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,10 +40,10 @@ public string[] GetUserGlobalCatalogMatches(string name) | |
name = name.ToLower(); | ||
return name switch | ||
{ | ||
"dfm" => new[] {"S-1-5-21-3130019616-2776909439-2417379446-1105"}, | ||
"dfm" => new[] { "S-1-5-21-3130019616-2776909439-2417379446-1105" }, | ||
"administrator" => new[] | ||
{"S-1-5-21-3130019616-2776909439-2417379446-500", "S-1-5-21-3084884204-958224920-2707782874-500"}, | ||
"admin" => new[] {"S-1-5-21-3130019616-2776909439-2417379446-2116"}, | ||
"admin" => new[] { "S-1-5-21-3130019616-2776909439-2417379446-2116" }, | ||
_ => Array.Empty<string>() | ||
}; | ||
} | ||
|
@@ -1023,15 +1023,15 @@ public virtual IEnumerable<ISearchResultEntry> QueryLDAP(LDAPQueryOptions option | |
public virtual IEnumerable<ISearchResultEntry> QueryLDAP(string ldapFilter, SearchScope scope, string[] props, | ||
CancellationToken cancellationToken, | ||
string domainName = null, bool includeAcl = false, bool showDeleted = false, string adsPath = null, | ||
bool globalCatalog = false, bool skipCache = false) | ||
bool globalCatalog = false, bool skipCache = false, bool throwException = false) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public virtual IEnumerable<ISearchResultEntry> QueryLDAP(string ldapFilter, SearchScope scope, string[] props, | ||
string domainName = null, | ||
bool includeAcl = false, bool showDeleted = false, string adsPath = null, bool globalCatalog = false, | ||
bool skipCache = false) | ||
bool skipCache = false, bool throwException = false) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
@@ -1049,7 +1049,7 @@ public ActiveDirectorySecurityDescriptor MakeSecurityDescriptor() | |
|
||
private Group GetBaseEnterpriseDC() | ||
{ | ||
var g = new Group {ObjectIdentifier = "TESTLAB.LOCAL-S-1-5-9".ToUpper()}; | ||
var g = new Group { ObjectIdentifier = "TESTLAB.LOCAL-S-1-5-9".ToUpper() }; | ||
g.Properties.Add("name", "ENTERPRISE DOMAIN [email protected]".ToUpper()); | ||
return g; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters