Skip to content

Instantly share code, notes, and snippets.

@gesslar
gesslar / sid.js
Created May 2, 2024 19:19 — forked from Krizzzn/sid.js
Convert binary buffer object SID to string
/*
# Convert binary encoded object SID to a string
# (eg. S-1-5-21-1004336348-1177238915-682003330-512)
#
# SID format: https://technet.microsoft.com/en-us/library/cc962011.aspx
#
# ldapjs `searchEntry` has attribute `raw` that holds the raw
# values, including the `objectSid` buffer when one exists. Pass that
# buffer to get the string representation that can then be easily
# used in LDAP search filters, for example.
@gesslar
gesslar / sid.js
Created May 2, 2024 19:19 — forked from Krizzzn/sid.js
Convert binary buffer object SID to string
/*
# Convert binary encoded object SID to a string
# (eg. S-1-5-21-1004336348-1177238915-682003330-512)
#
# SID format: https://technet.microsoft.com/en-us/library/cc962011.aspx
#
# ldapjs `searchEntry` has attribute `raw` that holds the raw
# values, including the `objectSid` buffer when one exists. Pass that
# buffer to get the string representation that can then be easily
# used in LDAP search filters, for example.
/*
(Date unknown) - Jezu@Astaria
Added error_handler() during porting to FluffOS
July 10, 2022 - Jezu@Astaria
- Refactored error_handler().
- Fixed bug in error_handler() that was incorrectly applying verbose_errors.
- Changed debug class for errors generated by wizards to be ':<wiz name>'. This is so wizzes can selectively enable which wizards they want to receive errors for.
{
"Africa/Abidjan": "+00:00",
"Africa/Accra": "+00:00",
"Africa/Addis_Ababa": "+03:00",
"Africa/Algiers": "+01:00",
"Africa/Asmara": "+03:00",
"Africa/Asmera": "+03:00",
"Africa/Bamako": "+00:00",
"Africa/Bangui": "+01:00",
"Africa/Banjul": "+00:00",