* 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.
In reviewing #1051 (and related #347) we found out that there's some ugly duplicated code that's better suited for an utils function.
The expected target format is:
`<DOMAIN></USERNAME><:PASSWORD>@HOSTNAME`
This PR:
- Moved target parsing routine to an utils module.
- Added unit tests for the new function.
- Using the new function across example scripts that accept a target.
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.
* I create a new parameters group called 'connection' where you can specify the destination port, the domain controller IP and the target IP (if needed)
* We should propagate the same schema over the rest of the scripts (whenever applicable)
* Aiming at addressing https://github.com/CoreSecurity/impacket/issues/172
Since impacket scripts use '@' as delimiter between the password and the IP address, a password with '@' (eg. 16char@Password) breaks the authentication.
Now there should be a single logger called 'impacket' the library uses.
By default is has a NullHandler so nothing is printed, but messages are
forwarded to the upstream logger.
If you are a script using the library and want to set the root logger
with a custom formatter, you can import impacket.examples.logger.
After some testing I'll merge it into master