This file contains hidden or 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
| # Get SID from MSSQL | |
| # MSSQL> SELECT SUSER_SID() | |
| import struct | |
| import sys | |
| def convert_sid(raw_sid: bytes) -> str: | |
| if not raw_sid: | |
| raise ValueError("Empty SID input") |