sa_inherit.py 266 字节 原文件 审查 历史 永久链接 1 2 3 4 5 6 7 import pywintypes, win32security sa=pywintypes.SECURITY_ATTRIBUTES() tmp_sid=win32security.LookupAccountName('','tmp')[0] sa.SetSecurityDescriptorOwner(tmp_sid,0) sid=sa.SECURITY_DESCRIPTOR.GetSecurityDescriptorOwner() print(win32security.LookupAccountSid('',sid))