
    r@;jE                     l    d dl Z d dlZd dlZd dlmZmZ d Zedk    r ed e                       dS dS )    N)TOKEN_QUERY	TokenUserc                     	 t          j        t          j                    t          d          } n^# t          j        $ rL}|d         t          j        k    r t          j        t          j	                    t                    } Y d }~nd }~ww xY wt          j
        | t                    \  }}t          j        |            t          j        d |          \  }}}|S )N   r   )win32securityOpenThreadTokenwin32apiGetCurrentThreadr   errorwinerrorERROR_NO_TOKENOpenProcessTokenGetCurrentProcessGetTokenInformationr   CloseHandleLookupAccountSid)tokdetailssidattrnamedomtyps          tC:\Users\Administrator\AppData\Local\Temp\2\pip-target-b0z114gj\lib\python\win32/Demos/security/query_information.pyGetDomainNamer      s    X+H,E,G,GVWXX> X X X1:000 ,X-G-I-I;WWX 1#yAAIC"3D#>>ND#sJs   ,/ B
ABB
__main__zDomain name is)	r	   r   r   ntsecurityconr   r   r   __name__print     r   <module>r"      s~          0 0 0 0 0 0 0 0    z	E
MMOO,,,,, r!   