Last active
July 25, 2022 16:09
-
-
Save rsperl/7a0bc0d9c3b083c8a33e02f2619254f8 to your computer and use it in GitHub Desktop.
convert a binary guid from ldap or active directory to a hex string #python #ldap #snippet
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
#!/usr/bin/python3 | |
import uuid | |
def guid_to_string(binary_guid: bytes) -> str: | |
return str(uuid.UUID(bytes_le=binary_guid)).lower() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment