VB Byte / SID Functions

All the random crap I spend all day long figuring out.
Post Reply
User avatar
Site Admin
Posts: 54
Joined: Tue Jan 06, 2009 9:25 pm

VB Byte / SID Functions

Post by syntax » Sun Oct 14, 2012 3:33 am


VBScript program demonstrating various functions to convert byte array attribute values into various formats. These functions are used with attributes with syntax OctetString and Sid. This includes attributes such as netbootGUID, objectGUID, objectSID, sidHistory, and tokenGroups. The functions in the program are:

Function OctetToHexStr
Converts any OctetString (byte array) to hex string.

Function HexGUIDToDisplay
Converts GUID value in hex format to display format.

Function DisplayGUIDToEscapedHex
Converts GUID value from display string to escaped hex
format (every byte escaped with a backslash).

Function HexSIDToDec
Converts most hex SID values to decimal format.

Function DecSIDToHex
Converts SID value from decimal to hex format.

Function ReverseHex
Reverses hex bytes. Used by Function DecSIDToHex.
(8.15 KiB) Downloaded 484 times

Post Reply