
    *1f(                         d dl Z d dlZd dlmZmZmZ d dlmZmZ  ej	        e
          Z G d dej        j                  Z G d dej        j                  Z G d d	ej        j                  ZdS )
    N)OptionalTupleUnion)	constants
interfacesc                       e Zd ZdZedee         fd            Zedeee	                  fd            Z
edeej                 fd            ZdS )ProducerMetadataz1Class to handle the Producer metadata from an ISFreturnc                 8    | j                             dd           S )Nname
_json_datagetselfs    X/home/panchajanya/Development/work/volatility3/volatility3/framework/symbols/metadata.pyr   zProducerMetadata.name   s    ""64000    c                     | j                             dd          }|sdS t          d |D                       r,t          d |                    d          D                       S t
                              t          j        d| d           dS )z,Returns the version of the ISF file producerversionNc                     g | ]}|d v S )z0123456789. .0xs     r   
<listcomp>z,ProducerMetadata.version.<locals>.<listcomp>   s    444q]"444r   c                 ,    g | ]}t          |          S r   )intr   s     r   r   z,ProducerMetadata.version.<locals>.<listcomp>   s    ===Q#a&&===r   .z2Metadata version contains unexpected characters: '')	r   r   alltuplesplitvolloglogr   LOGLEVEL_VVVV)r   r   s     r   r   zProducerMetadata.version   s     /%%i66 	444G44455 	?=='--*<*<===>>>

#KKKK	
 	
 	
 tr   c                     d| j         vrdS 	 t          j                            | j         d         d          }n2# t          t          f$ r t
                              d           Y dS w xY w|S )z2Returns a timestamp for when the file was produceddatetimeNz
YYYY-MM-DDz9Invalid timestamp in producer information of symbol table)r   r'   strptime	TypeError
ValueErrorr#   debug)r   	timestamps     r   r'   zProducerMetadata.datetime#   s     T_,,4	 )22
+\ II :& 	 	 	LLTUUU44	 s   +9 +A('A(N)__name__
__module____qualname____doc__propertyr   strr   r   r   r   r'   r   r   r   r	   r	      s        ;;1hsm 1 1 1 X1 %*-    X (8#45    X  r   r	   c            
           e Zd ZdZedeeeeeef         eeeeef         f                  fd            Z	edee
         fd            Zedee
         fd            Zedee         fd            ZdS )WindowsMetadataz9Class to handle the metadata from a Windows symbol table.r
   c                    | j                             di                               dd           }| j                             di                               dd           }| j                             di                               dd           }| j                             di                               dd           }|||d S ||||fS ||||fS )Npebuildrevisionminormajorr   )r   r7   r8   r9   r:   s        r   
pe_versionzWindowsMetadata.pe_version5   s     ##D"--11'4@@?&&tR0044ZFF##D"--11'4@@##D"--11'4@@u}4=%))eXu,,r   c                 H    | j         d S d                    | j                   S )Nr   )r;   joinr   s    r   pe_version_stringz!WindowsMetadata.pe_version_stringC   s#    ?"4xx(((r   c                 `    | j                             di                               dd           S )NpdbGUIDr   r   s    r   pdb_guidzWindowsMetadata.pdb_guidI   s*    ""5"--11&$???r   c                 `    | j                             di                               dd           S )Nr@   ager   r   s    r   pdb_agezWindowsMetadata.pdb_ageM   s*    ""5"--11%>>>r   N)r-   r.   r/   r0   r1   r   r   r   r   r;   r2   r>   rB   rE   r   r   r   r4   r4   2   s        CC-	%c3m,eCc34F.GGH	I- - - X- )8C= ) ) ) X)
 @(3- @ @ @ X@ ?# ? ? ? X? ? ?r   r4   c                       e Zd ZdZdS )LinuxMetadataz7Class to handle the metadata from a Linux symbol table.N)r-   r.   r/   r0   r   r   r   rG   rG   R   s        AAAAr   rG   )r'   loggingtypingr   r   r   volatility3.frameworkr   r   	getLoggerr-   r#   symbolsMetadataInterfacer	   r4   rG   r   r   r   <module>rN      s  
   ) ) ) ) ) ) ) ) ) ) 7 7 7 7 7 7 7 7		8	$	$! ! ! ! !z); ! ! !H? ? ? ? ?j(: ? ? ?@B B B B BJ&8 B B B B Br   