Compressing GUIDs

Posted on by 0 comment

GUIDs are the Globally unique Identifiers used by windows to install and identify software; they are used in the registry to ensure that keys used that piece of software are unique, a normal guid will look like this {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} but this guid is only one of the ways software will identify it’s self in the registry. You can also have a compressed GUID which you can get from a normal GUID by following this process

The first group of eight hexadecimal digits are placed in reverse order:


The same is done with the second group of four hexadecimal digits:

IJKL becomes LKJI

The same is done with the third group of four hexadecimal digits:

MNOP becomes PONM

In the fourth group of four hexadecimal digits, every two digits switch places:

1234 becomes 2143

In the last group of 12 hexadecimal digits, again every two digits switch places:

Lastly remove all {} ans -’s

python function to do this for you

compress_guid=(lambda guid:"".join(map(lambda x: x[::-1],guid[0:3])+map(lambda x:''.join([x[i:(i+2):][::-1]for i in range(0,len(x),2)]),guid[4:])))

compressed GUIDs occur in various places in the registry common ones being
and somewhere under

Leave a Reply

Your email address will not be published. Required fields are marked *