Merge pull request #77 from Slowerzs/main
Fix LDAP search for domains with numerous computers
This commit is contained in:
commit
61bc351263
|
@ -141,10 +141,13 @@ def fetch_all_computers(options):
|
||||||
options.lmhash,
|
options.lmhash,
|
||||||
options.nthash,
|
options.nthash,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
paged_search_control = ldapasn1.SimplePagedResultsControl(criticality=True, size=1000)
|
||||||
|
|
||||||
results = ldap_connection.search(
|
results = ldap_connection.search(
|
||||||
searchFilter=ldap_filter,
|
searchFilter=ldap_filter,
|
||||||
attributes=attributes,
|
attributes=attributes,
|
||||||
sizeLimit=0,
|
searchControls=[paged_search_control],
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
donpapi_logger.error(f"Exception while requesting targets: {e}")
|
donpapi_logger.error(f"Exception while requesting targets: {e}")
|
||||||
|
|
Loading…
Reference in New Issue