sa_inherit.py 266 B

1234567
  1. import pywintypes, win32security
  2. sa=pywintypes.SECURITY_ATTRIBUTES()
  3. tmp_sid=win32security.LookupAccountName('','tmp')[0]
  4. sa.SetSecurityDescriptorOwner(tmp_sid,0)
  5. sid=sa.SECURITY_DESCRIPTOR.GetSecurityDescriptorOwner()
  6. print(win32security.LookupAccountSid('',sid))