Skip to content

Commit

Permalink
chore: up default port scan timeout (#113)
Browse files Browse the repository at this point in the history
chore: bump commonlib version
chore: bump version
  • Loading branch information
rvazarkar authored Sep 3, 2024
1 parent 0dff518 commit b3bba2c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 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.4</Version>
<FileVersion>2.5.4</FileVersion>
<Version>2.5.6</Version>
<FileVersion>2.5.6</FileVersion>
<Company>SpecterOps</Company>
<Product>SharpHound</Product>
<AssemblyName>SharpHound</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion src/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public class Options
[Option(HelpText = "Skip checking if 445 is open", Default = false)]
public bool SkipPortCheck { get; set; }

[Option(HelpText = "Timeout for port checks in milliseconds", Default = 500)]
[Option(HelpText = "Timeout for port checks in milliseconds", Default = 10000)]
public int PortCheckTimeout { get; set; }

[Option(HelpText = "Skip check for PwdLastSet when enumerating computers", Default = false)]
Expand Down
6 changes: 4 additions & 2 deletions src/Runtime/ObjectProcessors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ private static Dictionary<string, object> GetCommonProperties(IDirectoryObject e

return props;
}



private async Task<User> ProcessUserObject(IDirectoryObject entry,
ResolvedSearchResult resolvedSearchResult) {
Expand Down Expand Up @@ -315,15 +317,15 @@ private async Task<Group> ProcessGroupObject(IDirectoryObject entry,
ret.Properties.Add("samaccountname", entry.GetProperty(LDAPProperties.SAMAccountName));

if ((_methods & CollectionMethod.ACL) != 0) {
ret.Aces = await _aclProcessor.ProcessACL(resolvedSearchResult, entry).ToArrayAsync();
ret.Aces = await _aclProcessor.ProcessACL(resolvedSearchResult, entry).ToArrayAsync(cancellationToken: _cancellationToken);
ret.IsACLProtected = _aclProcessor.IsACLProtected(entry);
ret.Properties.Add("isaclprotected", ret.IsACLProtected);
}

if ((_methods & CollectionMethod.Group) != 0)
ret.Members = await _groupProcessor
.ReadGroupMembers(resolvedSearchResult, entry)
.ToArrayAsync();
.ToArrayAsync(cancellationToken: _cancellationToken);

if ((_methods & CollectionMethod.ObjectProps) != 0) {
var groupProps = LdapPropertyProcessor.ReadGroupProperties(entry);
Expand Down

0 comments on commit b3bba2c

Please sign in to comment.