* Standardized examples logger init method
* Fixing missing import
* Standardized examples init_ldap_session function #1
* Calling new shared function _ldap3_kerberos_login from example addcomputer
* Removed considering -debug in each example. Now it's handled in utils.
* Standardized EMPTY_LM_HASH in impacket.examples.utils
* Unify parse_identity function (phase 1)
* Standardized parse_identity
* Renamed "_ldap3_kerberos_login" to "ldap3_kerberos_login" (as it is called from outside)
* Standardize "logger" init in regsecrets.py
* Standardized LDAP login into a single function in utils.py:ldap_login
This was a pending change to:
- Use the same tagline, copyright and license notice across files.
- Remove authors' contacts that are no longer valid (due to affiliation changes).
- Update repository location.
- Update license file with missing licenses (althought those were already in source files).
This doesn't include any change on the source code, nor any change on current copyright or licenses. Just formatting and phrasing to make our and distro's maintainers life easier.
Similar to and on top of #1053, this moves the credentials/account parsing regex to an utils module and reduces duplicated code in example scripts.
The expected credential format is:
`<DOMAIN></USERNAME><:PASSWORD>`
Note that the regular expression used in `exchanger.py` was different (excluded ':' from the hostname) but I didn't found any reason to keep it different from all other scripts.
This PR:
- Moved credentials parsing routine to an utils module.
- Added unit tests for the new function.
- Using the new function across example scripts that accept a credential/account.
* Disabled accounts will be included if -all, that replaced -all-users switch
* When using -user switch, if the account is disabled, no records will return. You will need to specify -all in order to get something.
* Should address https://github.com/CoreSecurity/impacket/issues/454#issuecomment-390240413
* With 1000 entries we were getting: "LdapErr: DSID-0C060671, comment: The server is sending data faster than the client has been receiving. Subsequent requests will fail until the client catches up"
* Minor changes to make it Python3 compatible
* Implementing the search perRecordCallback feature will prevent memory from getting exhausted
* One drawback tho, is that columns with for the table are fixed, since we don't have all the
rows for calculating the right width. Maybe we should just output CVS and that's it.
Replaced all instances of `#!/usr/bin/python` with `#!/usr/bin/env python` so impacket's examples and scripts can be run inside a virtualenv without having to call python.
This script will gather data about the domain's users and their corresponding email addresses. It will also
include some extra information about last logon and last password set attributes.
You can enable or disable the the attributes shown in the final table by changing the values in line 184 and
headers in line 190.
If no entries are returned that means users don't have email addresses specified.