
    <i$                        S r SSKJr  SSKrSSKJr  SSKJrJr  SSK	J
r
JrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJr  SS	KJrJrJr  SS
KJ r J!r!  SSK"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-   " S S\5      r. " S S\5      r/ " S S\5      r0 " S S\5      r1 " S S\5      r2 " S S\5      r3 " S S\5      r4 " S S\5      r5 " S S\5      r6 " S S\5      r7 " S  S!\5      r8 " S" S#\5      r9 " S$ S%\5      r: " S& S'\5      r; " S( S)\5      r< " S* S+\5      r= " S, S-\5      r> " S. S/\5      r? " S0 S1\5      r@ " S2 S3\5      rA " S4 S5\5      rB " S6 S7\5      rC " S8 S9\5      rD " S: S;\5      rE " S< S=\5      rF " S> S?\5      rG " S@ SA\5      rH " SB SC\5      rI " SD SE\5      rJ " SF SG\5      rK " SH SI\5      rL " SJ SK\5      rM " SL SM\5      rN " SN SO\5      rO " SP SQ\5      rP " SR SS\5      rQSUST jrRg)VzSTIX 2.1 Cyber Observable Objects.

Embedded observable object types, such as Email MIME Component, which is
embedded in Email Message objects, inherit from ``_STIXBase21`` instead of
_Observable and do not have a ``_type`` attribute.
    )OrderedDictN   )_custom_observable_builder)AtLeastOnePropertyErrorDependentPropertiesError)BinaryPropertyBooleanPropertyDictionaryPropertyEmbeddedObjectPropertyEnumPropertyExtensionsPropertyFloatPropertyHashesPropertyHexProperty
IDPropertyIntegerPropertyListPropertyOpenVocabPropertyReferencePropertyStringPropertyTimestampPropertyTypeProperty   )
_Extension_Observable_STIXBase21)CustomExtensionGranularMarking)ACCOUNT_TYPEENCRYPTION_ALGORITHMHASHING_ALGORITHMNETWORK_SOCKET_ADDRESS_FAMILYNETWORK_SOCKET_TYPEWINDOWS_INTEGRITY_LEVELWINDOWS_PEBINARY_TYPEWINDOWS_REGISTRY_DATATYPEWINDOWS_SERVICE_START_TYPEWINDOWS_SERVICE_STATUSWINDOWS_SERVICE_TYPEc                   $  ^  \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" 5       4S\
" 5       4S\" 5       4S\" \SS94S\" \5      4S\" 5       4S\" \" SSS95      4S\" \5      4S\" S S94S\" SS94/5      rSS/rU 4S jrSrU =r$ )Artifact   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_4jegwl6ojbes>`__.
artifacttype2.1spec_versionr1   fixedid	mime_typepayload_binurlhashesencryption_algorithmdecryption_keyobject_marking_refsmarking-definitionvalid_typesr1   granular_markingsdefangedc                      gNF rC       O/home/james-whalen/.local/lib/python3.13/site-packages/stix2/v21/observables.py<lambda>Artifact.<lambda>0       UrD   default
extensionsc                 x   > [         [        U ]  5         U R                  SS/5        U R	                  S/S/5        g )Nr6   r7   r8   )superr+   _check_object_constraints$_check_mutually_exclusive_properties_check_properties_dependencyself	__class__s    rE   rN   "Artifact._check_object_constraints5   s7    h7911=%2HI))8*ug>rD   rC   )__name__
__module____qualname____firstlineno____doc___typer   r   r   r   r   r   r!   r   r    r   r   r   r	   r   _properties_id_contributing_propertiesrN   __static_attributes____classcell__rS   s   @rE   r+   r+      s     E	e%89	e45	z%e45	n&'	()	 !	>"3%HI	.B!CD	>+,	->K_ns-t uv	l?;<	_];<	)u=> K $,]";? ?rD   r+   c                       \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\
" SS94S\" 5       4S\" 5       4S\" \" SSS95      4S\" \5      4S\" S S94S\" SS94/
5      rS
/rSrg)AutonomousSystem;   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_27gux0aol9e3>`__.
autonomous-systemr.   r/   r0   r1   r2   r4   numberTrequirednamerirr;   r<   r=   r?   r@   c                      grB   rC   rC   rD   rE   rF   AutonomousSystem.<lambda>J   rH   rD   rI   rK   rC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r   r   r   r   r   r	   r   r[   r\   r]   rC   rD   rE   ra   ra   ;   s      E	e%89	e45	z%e45	?D12	!"	 !	->K_ns-t uv	l?;<	_];<	)u=> K $,*rD   ra   c                      \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" SS94S\" 5       4S\
" 5       4S\
" 5       4S\
" 5       4S\" \" SS/SS95      4S\" \" SSS95      4S\" \5      4S\" S S94S\" SS94/5      rS
/rSrg)	DirectoryP   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_lyvpga5hlw52>`__.
	directoryr.   r/   r0   r1   r2   r4   pathTre   path_encctimemtimeatimecontains_refsfiler=   r;   r<   r?   r@   c                      grB   rC   rC   rD   rE   rF   Directory.<lambda>c   rH   rD   rI   rK   rC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r   r   r   r   r   r	   r   r[   r\   r]   rC   rD   rE   rl   rl   P   s     E	e%89	e45	z%e45	./	^%&	#%&	#%&	#%&	,'8fkEZin'opq	->K_ns-t uv	l?;<	_];<	)u=> K  $*(rD   rl   c                       \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" SS94S\
" \" / SQSS95      4S\
" \" SSS95      4S\
" \5      4S\" S S94S\" SS94/	5      rS
/rSrg)
DomainNamei   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_prhhksbxbg87>`__.
domain-namer.   r/   r0   r1   r2   r4   valueTre   resolves_to_refs)	ipv4-addr	ipv6-addrr{   r=   r;   r<   r?   r@   c                      grB   rC   rC   rD   rE   rF   DomainName.<lambda>w   rH   rD   rI   rK   rC   NrU   rV   rW   rX   rY   rZ   r   r   r   r   r   r   r   r	   r   r[   r\   r]   rC   rD   rE   ry   ry   i   s     E	e%89	e45	z%e45	.$/0	\*;Hq  AF  +G  H  	I	->K_ns-t uv	l?;<	_];<	)u=>
 
K $+)rD   ry   c                       \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" SS94S\" 5       4S\
" SSS94S\" \
" SSS95      4S\" \5      4S\" S S94S\" SS94/
5      rS
/rSrg)EmailAddress}   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_wmenahkvqmgj>`__.

email-addrr.   r/   r0   r1   r2   r4   r|   Tre   display_namebelongs_to_refuser-accountr=   r;   r<   r?   r@   c                      grB   rC   rC   rD   rE   rF   EmailAddress.<lambda>   rH   rD   rI   rK   rC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r   r   r   r   r	   r   r[   r\   r]   rC   rD   rE   r   r   }   s     E	e%89	e45	z%e45	.$/0	)*	,V[\]	->K_ns-t uv	l?;<	_];<	)u=> K $+)rD   r   c            	          ^  \ rS rSrSr\" S\" 5       4S\" SS/SS94S	\" 5       4S
\" 5       4/5      rU 4S jr	Sr
U =r$ )EmailMIMEComponent   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_qpo5x7d8mefq>`__.
bodybody_raw_refr-   ru   r/   r=   content_typecontent_dispositionc                 P   > [         [        U ]  5         U R                  SS/5        g )Nr   r   )rM   r   rN   _check_at_least_one_propertyrQ   s    rE   rN   ,EmailMIMEComponent._check_object_constraints   s$     $AC))6>*BCrD   rC   )rU   rV   rW   rX   rY   r   r   r   r[   rN   r]   r^   r_   s   @rE   r   r      s\     	!"	*
F7KZ_`a	)*	 01	 KD DrD   r   c                     ^  \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\
" SS94S\" 5       4S\" 5       4S\" SSS94S\" SSS94S\" \" SSS95      4S\" \" SSS95      4S\" \" SSS95      4S\" 5       4S\" 5       4S\" \5      4S\" SS94S\" 5       4S\" \" \S95      4S\" SSS94S\" \" S SS95      4S!\" \5      4S"\
" S# S$94S%\" SS94/5      r/ S&QrU 4S' jrS(rU =r$ ))EmailMessage   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_grboc7sq5514>`__.
zemail-messager.   r/   r0   r1   r2   r4   is_multipartTre   dater   from_refr   r=   
sender_refto_refscc_refsbcc_refs
message_idsubjectreceived_linesadditional_header_fieldsr   body_multipartr.   raw_email_refr-   r;   r<   r?   r@   c                      grB   rC   rC   rD   rE   rF   EmailMessage.<lambda>   rH   rD   rI   rK   )r   r   r   c                    > [         [        U ]  5         U R                  S/S/5        U R	                  S5      SL a.  U R	                  S5      (       a  [        U R                  S/5      eg g )Nr   r   Tr   )r   r   )rM   r   rN   rP   getr   rS   rQ   s    rE   rN   &EmailMessage._check_object_constraints   sd    lD;=))>*:=M<NO88N#t+0@0@*4>><T;UVV 1A+rD   rC   )rU   rV   rW   rX   rY   rZ   r   r   r   r   r	   r   r   r   r
   r   r   r   r   r[   r\   rN   r]   r^   r_   s   @rE   r   r      s    E	e%89	e45	z%e45	$78	"$%	)*	&<eTU	(\PUVW	L!2|Z_!`ab	L!2|Z_!`ab	\"3[`"abc	~'(	N$%	<78	#%7U%KL	!"	<(>DV(WXY	+
QVWX	->K_ns-t uv	l?;<	_];<	)u=>- K0 #BW WrD   r   c            
       Z    \ rS rSrSrSr\" S\" \" SS/SS9S	S
94S\	" 5       4/5      r
Srg)
ArchiveExt   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_xi3g7dwaigs6>`__.
zarchive-extrt   ru   rn   r/   r=   Tre   commentrC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r   r[   r]   rC   rD   rE   r   r      sI     E	,'8fkEZin'oz~  	A	N$% KrD   r   c            	       V    \ rS rSrSr\" S\" SS94S\" \SS94S	\	" 5       4/5      r
S
rg)AlternateDataStream   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_8i2ts0xicqea>`__.
rg   Tre   r8   r/   r0   sizerC   N)rU   rV   rW   rX   rY   r   r   r   r!   r   r[   r]   rC   rD   rE   r   r      s@     	./	>"3%HI	"# KrD   r   c            
       V    \ rS rSrSrSr\" S\" 5       4S\" \	" \
S95      4/5      rSrg)	NTFSExt   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_o6cweepfrsci>`__.
zntfs-extsidalternate_data_streamsr   rC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r   r   r[   r]   rC   rD   rE   r   r      s<     E	 !	!<0FL_0`#ab KrD   r   c            	       z    \ rS rSrSrSr\" S\" 5       4S\" 5       4S\	" SS94S	\" 5       4S
\" 5       4/5      r
Srg)PDFExt   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_8xmpb2ghp9km>`__.
zpdf-extversionis_optimizeddocument_info_dictr/   r0   pdfid0pdfid1rC   N)rU   rV   rW   rX   rY   rZ   r   r   r	   r
   r[   r]   rC   rD   rE   r   r      sW     E	N$%	*+	1uEF	>#$	>#$ KrD   r   c            
       j    \ rS rSrSrSr\" S\" 5       4S\" 5       4S\" 5       4S\" SS	94/5      r	S
r
g)RasterImageExt   zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_u5z7i2ox8w4x>`__.
zraster-image-extimage_heightimage_widthbits_per_pixel	exif_tagsr/   r0   rC   N)rU   rV   rW   rX   rY   rZ   r   r   r
   r[   r]   rC   rD   rE   r   r      sL     E	*+	)*	?,-	(e<=	 KrD   r   c            	       \  ^  \ rS rSrSr\" / S\" 5       4PS\" 5       4PS\" 5       4PS\" SS94PS	\" SS94PS
\" SS94PS\" 5       4PS\" 5       4PS\" 5       4PS\" 5       4PS\" 5       4PS\" 5       4PS\" 5       4PS\" 5       4PS\" 5       4PS\" 5       4PS\" 5       4PS\" 5       4PS\" 5       4PS\" SS94PS\" SS94PS\" 5       4PS\" 5       4PS\" 5       4PS\" SS94PS\" SS94PS\" 5       4PS \" 5       4PS!\" 5       4PS"\" 5       4PS#\" \	S$S%94P5      r
U 4S& jrS'rU =r$ )(WindowsPEOptionalHeaderTypei  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_29l09w731pzc>`__.
	magic_hexmajor_linker_versionminor_linker_versionsize_of_coder   minsize_of_initialized_datasize_of_uninitialized_dataaddress_of_entry_pointbase_of_codebase_of_data
image_basesection_alignmentfile_alignmentmajor_os_versionminor_os_versionmajor_image_versionminor_image_versionmajor_subsystem_versionminor_subsystem_versionwin32_version_value_hexsize_of_imagesize_of_headerschecksum_hexsubsystem_hexdll_characteristics_hexsize_of_stack_reservesize_of_stack_commitsize_of_heap_reservesize_of_heap_commitloader_flags_hexnumber_of_rva_and_sizesr8   r/   r0   c                 J   > [         [        U ]  5         U R                  5         g )N)rM   r   rN   r   rQ   s    rE   rN   5WindowsPEOptionalHeaderType._check_object_constraints3  s    )4JL))+rD   rC   )rU   rV   rW   rX   rY   r   r   r   r   r!   r[   rN   r]   r^   r_   s   @rE   r   r     s[      	km$ 	!23  
 !23  
Q/0	 
 
$_%;<  
&1'=>  
"?#45  
*+  
*+  
()  
o/0  
?,-  
_./  
_./  
 12   
 12! " 
#O$56# $ 
#O$56% & 
#KM2' ( 
/a01) * 
O23+ , 
'- . 
+-(/ 0 
#KM21 2 
!/a"893 4 
 Q!785 6 
 !237 8 
 129 : 
[]+; < 
#O$56= > 
>"3%HI?   KD, ,rD   r   c                   d    \ rS rSrSr\" S\" SS94S\" SS94S	\" 5       4S
\	" \
SS94/5      rSrg)WindowsPESectioni8  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_ioapwyd8oimw>`__.
rg   Tre   r   r   r   entropyr8   r/   r0   rC   N)rU   rV   rW   rX   rY   r   r   r   r   r   r!   r[   r]   rC   rD   rE   r   r   8  sL     	./	Q'(	MO$	>"3%HI	 KrD   r   c                       \ rS rSrSrSr\" S\" \SS94S\	" 5       4S\
" 5       4S	\" S
S94S\" SS94S\
" 5       4S\" S
S94S\" S
S94S\
" 5       4S\" \SS94S\" \S94S\" \" \S95      4/5      rSrg)WindowsPEBinaryExtiE  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_gg5zibddf9bs>`__.
zwindows-pebinary-extpe_typeTre   imphashmachine_hexnumber_of_sectionsr   r   time_date_stampsecond)	precisionpointer_to_symbol_table_hexnumber_of_symbolssize_of_optional_headercharacteristics_hexfile_header_hashesr/   r0   optional_headerr   sectionsrC   N)rU   rV   rW   rX   rY   rZ   r   r   r%   r   r   r   r   r   r!   r   r   r   r   r[   r]   rC   rD   rE   r   r   E  s     #E	%&;dKL	N$%	&	156	-AB	&6	o!45	"O$:;	.	~.?eTU	28STU	\"8>N"OPQ KrD   r   c                     ^  \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\
" \SS94S\" SS94S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" SSS94S\" \" S/SS95      4S\" SSS94S\" \" SSS95      4S\" \5      4S\" S  S!94S"\" SS94/5      r/ S#QrU 4S$ jrS%rU =r$ )&Filei[  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_99bl2dibcztv>`__.
ru   r.   r/   r0   r1   r2   r4   r8   r   r   r   rg   name_encmagic_number_hexr5   rq   rr   rs   parent_directory_refrn   r=   rt   SCOcontent_refr-   r;   r<   r?   r@   c                      grB   rC   rC   rD   rE   rF   File.<lambda>s  rH   rD   rI   rK   )r8   rg   r  rK   c                 P   > [         [        U ]  5         U R                  SS/5        g )Nr8   rg   )rM   r   rN   r   rQ   s    rE   rN   File._check_object_constraintsx  s#    dD35))8V*<=rD   rC   )rU   rV   rW   rX   rY   rZ   r   r   r   r   r   r!   r   r   r   r   r   r   r	   r   r[   r\   rN   r]   r^   r_   s   @rE   r   r   [  s@    E	e%89	e45	z%e45	>"3%HI	Q'(	!"	^%&	[]+	n&'	#%&	#%&	#%&	!2{Y^!_`	,'8eW[`'abc	)juUV	->K_ns-t uv	l?;<	_];<	)u=>' K* #[> >rD   r   c                       \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" SS94S\
" \" SSS95      4S\
" \" SSS95      4S\
" \" SSS95      4S\
" \5      4S\" S S94S\" SS94/
5      rS
/rSrg)IPv4Addressi}  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_ki1ufj1ku8s0>`__.
r~   r.   r/   r0   r1   r2   r4   r|   Tre   r}   mac-addrr=   belongs_to_refsrc   r;   r<   r?   r@   c                      grB   rC   rC   rD   rE   rF   IPv4Address.<lambda>  rH   rD   rI   rK   rC   Nr   rC   rD   rE   r  r  }       E	e%89	e45	z%e45	.$/0	\*;
af*ghi	L):GZin)opq	->K_ns-t uv	l?;<	_];<	)u=> K $+)rD   r  c                       \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" SS94S\
" \" SSS95      4S\
" \" SSS95      4S\
" \" SSS95      4S\
" \5      4S\" S S94S\" SS94/
5      rS
/rSrg)IPv6Addressi  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_oeggeryskriq>`__.
r   r.   r/   r0   r1   r2   r4   r|   Tre   r}   r  r=   r  rc   r;   r<   r?   r@   c                      grB   rC   rC   rD   rE   rF   IPv6Address.<lambda>  rH   rD   rI   rK   rC   Nr   rC   rD   rE   r  r    r  rD   r  c                       \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" SS94S\
" \" SSS95      4S\
" \5      4S\" S S94S\" SS94/5      rS
/rSrg)
MACAddressi  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_f92nr9plf58y>`__.
r  r.   r/   r0   r1   r2   r4   r|   Tre   r;   r<   r=   r?   r@   c                      grB   rC   rC   rD   rE   rF   MACAddress.<lambda>  rH   rD   rI   rK   rC   Nr   rC   rD   rE   r  r    s     E	e%89	e45	z%e45	.$/0	->K_ns-t uv	l?;<	_];<	)u=>	 	K $+)rD   r  c                       \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" SS94S\
" \" SSS95      4S\
" \5      4S\" S S94S\" SS94/5      rS
/rSrg)Mutexi  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_84hwlkdmev1w>`__.
mutexr.   r/   r0   r1   r2   r4   rg   Tre   r;   r<   r=   r?   r@   c                      grB   rC   rC   rD   rE   rF   Mutex.<lambda>  rH   rD   rI   rK   rC   Nr   rC   rD   rE   r  r    s     E	e%89	e45	z%e45	./	->K_ns-t uv	l?;<	_];<	)u=>	 	K $*(rD   r  c                       \ rS rSrSrSr\" S\" SS94S\" SS94S\" 5       4S	\" S
S94S\	" 5       4S\
" SS
S94/5      rSrg)HTTPRequestExti  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_b0e376hgtml8>`__.
zhttp-request-extrequest_methodTre   request_valuerequest_versionrequest_headerr/   r0   message_body_lengthmessage_body_data_refr-   r=   rC   N)rU   rV   rW   rX   rY   rZ   r   r   r
   r   r   r[   r]   rC   rD   rE   r  r    sl     E	>489	.$78	N,-	-5AB	 12	 "3
Y^"_` KrD   r  c                   H    \ rS rSrSrSr\" S\" SS94S\" SS94/5      rSr	g	)
ICMPExti  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_ozypx0lmkebv>`__.
zicmp-exticmp_type_hexTre   icmp_code_hexrC   N
rU   rV   rW   rX   rY   rZ   r   r   r[   r]   rC   rD   rE   r'  r'    s7     E	+t45	+t45 KrD   r'  c                      ^  \ rS rSrSrSr\" S\" \SS94S\	" 5       4S\	" 5       4S	\
" S
S94S\" \5      4S\" SS94S\" 5       4/5      rU 4S jrSrU =r$ )	SocketExti  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_8jamupj9ubdv>`__.
z
socket-extaddress_familyTre   is_blockingis_listeningoptionsr/   r0   socket_typesocket_descriptorr   r   socket_handlec                   > [         [        U ]  5         U R                  S5      nUbd  / SQnUR	                  5        HK  u  p4US UR                  S5      S-    U;  a  [        S5      e[        U[        5      (       a  MB  [        S5      e   g g )Nr0  )SO_ICMP_ICMP6_IP_IPV6_MCAST_TCP_IRLMP__r   zIncorrect options keyz Options value must be an integer)	rM   r,  rN   r   itemsfind
ValueError
isinstanceint)rR   r0  acceptable_prefixeskeyvalrS   s        rE   rN   #SocketExt._check_object_constraints  s    i8:((9%"h#MMO))*2EE$%<==!#s++$%GHH	 , rD   rC   )rU   rV   rW   rX   rY   rZ   r   r   r"   r	   r
   r#   r   r[   rN   r]   r^   r_   s   @rE   r,  r,    s     E	<(EPTUV	)*	*+	&E:;	%89:	o!45	/+, KI IrD   r,  c                   L    \ rS rSrSrSr\" S\" 5       4S\" 5       4/5      rSr	g)TCPExti  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_k2njqio7f142>`__.
ztcp-extsrc_flags_hexdst_flags_hexrC   Nr*  rC   rD   rE   rH  rH    s1     E	+-(	+-( KrD   rH  c                     ^  \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\
" 5       4S\
" 5       4S\" 5       4S\" / SQSS94S\" / SQSS94S\" SSS94S\" SSS94S\" \SS94S\" SS94S\" SS94S\" SS94S\" SS94S\" SS94S\" S SS94S!\" S SS94S"\" \" SSS95      4S#\" SSS94S$\" \" S%SS95      4S&\" \5      4S'\" S( S)94S*\" SS94/5      r/ S+QrU 4S, jrS-rU =r$ ).NetworkTraffici  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_rgnc3w40xy>`__.
network-trafficr.   r/   r0   r1   r2   r4   startend	is_activesrc_ref)r~   r   r  r{   r=   dst_refsrc_portr   i  )r   maxdst_port	protocolsTre   src_byte_countr   dst_byte_countsrc_packetsdst_packetsipfixsrc_payload_refr-   dst_payload_refencapsulates_refsencapsulated_by_refr;   r<   r?   r@   c                      grB   rC   rC   rD   rE   rF   NetworkTraffic.<lambda>0  rH   rD   rI   rK   )rN  rO  rQ  rR  rS  rU  rV  rK   c                   > [         [        U ]  5         U R                  SS/5        U R	                  S5      nU R	                  S5      nU R	                  S5      nU(       a!  USLa  Sn[        UR                  U 5      5      eU(       a!  USL a  S	n[        UR                  U 5      5      eU(       a*  U(       a"  X!:  a  S
n[        UR                  U 5      5      eg g g )NrQ  rR  rN  rO  rP  Fz4{0.id} 'is_active' must be False if 'end' is presentTz9{0.id} if 'is_active' is True, 'end' must not be includedz5{0.id} 'end' must be greater than or equal to 'start')rM   rL  rN   r   r   r@  format)rR   rN  rO  rP  msgrS   s        rE   rN   (NetworkTraffic._check_object_constraints5  s    nd=?))9i*@A!hhuoHH[)	9E)HCSZZ-..9$MCSZZ-..SS[ICSZZ-.. )S5rD   rC   )rU   rV   rW   rX   rY   rZ   r   r   r   r   r   r	   r   r   r   r
   r   r   r[   r\   rN   r]   r^   r_   s   @rE   rL  rL    s    E	e%89	e45	z%e45	#%&	!#$	o'(	%2gv{|}	%2gv{|}	_67	_67	l>DAB	?q12	?q12	A./	A./	$%89	-*SXYZ	-*SXYZ	l+<IZin+opq	 1>O^c de	->K_ns-t uv	l?;<	_];<	)u=>1 K4 #|/ /rD   rL  c                       \ rS rSrSrSr\" S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S	\	" S
S94S\
" \5      4/5      rSrg)WindowsProcessExtiJ  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_oyegq07gjf5t>`__.
windows-process-extaslr_enableddep_enabledpriority	owner_sidwindow_titlestartup_infor/   r0   integrity_levelrC   N)rU   rV   rW   rX   rY   rZ   r   r	   r   r
   r   r$   r[   r]   rC   rD   rE   rg  rg  J  sp     "E	*+	)*	^%&	n&'	)*	+?@	L)@AB KrD   rg  c                       \ rS rSrSrSr\" S\" 5       4S\" \5      4S\" 5       4S\" 5       4S\	" \
5      4S	\" \" S
SS95      4S\	" \5      4S\	" \5      4/5      rSrg)WindowsServiceExti[  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_lbcvc2ahx1s0>`__.
zwindows-service-extservice_namedescriptionsr   
group_name
start_typeservice_dll_refsru   r/   r=   service_typeservice_statusrC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r   r'   r   r)   r(   r[   r]   rC   rD   rE   rq  rq  [  s     "E	)*	n56	)*	~'(	|$>?@	\*;]b*cde	&:;<	<(>?@	 	KrD   rq  c                     ^  \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\
" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" SS94S\" \" SSS95      4S\" SSS94S\" SSS94S\" SSS94S\" \" SSS95      4S\" \" SSS95      4S\" \5      4S\
" S S94S\" SS94/5      r/ rU 4S  jrS!rU =r$ )"Processim  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_hpppnm86a1jm>`__.
processr.   r/   r0   r1   r2   r4   	is_hiddenpidcreated_timecwdcommand_lineenvironment_variablesopened_connection_refsrM  r=   creator_user_refr   	image_refru   
parent_ref
child_refsr;   r<   r?   r@   c                      grB   rC   rC   rD   rE   rF   Process.<lambda>  rH   rD   rI   rK   c                 b  > [         [        U ]  5          U R                  5         SU R	                  S0 5      ;   a  U R
                  S   R                  5         g g ! [         aJ  nSU ;  a  UeSU R	                  S0 5      ;   a"  U R
                  S   R                  5          S nAg  S nAg S nAff = f)Nrh  rK   )rM   rz  rN   r   r   rK   r   )rR   enclosing_excrS   s     rE   rN   !Process._check_object_constraints  s    gt68		Z--/$r(BB 56SSU C& 	Z4'##(DHH\2,FFOO$9:WWYY G		Zs   AA 
B.$;B))B.rC   )rU   rV   rW   rX   rY   rZ   r   r   r   r   r	   r   r   r
   r   r   r   r   r[   r\   rN   r]   r^   r_   s   @rE   rz  rz  m  s@    E	e%89	e45	z%e45	o'(	!"	*,-	 !	)*	 "4%"HI	!<0AN_ns0t#uv	.>X]^_	'FOP	(YUST	|$5)Z_$`ab	->K_ns-t uv	l?;<	_];<	)u=>' K* #%Z ZrD   rz  c                      \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" SS94S\" 5       4S\" 5       4S\
" \5      4S\" 5       4S\" 5       4S\
" \" SSS95      4S\
" \5      4S\" S S94S\" SS94/5      r/ SQrSrg)Softwarei  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_7rkyhtkdthok>`__.
softwarer.   r/   r0   r1   r2   r4   rg   Tre   cpeswid	languagesvendorr   r;   r<   r=   r?   r@   c                      grB   rC   rC   rD   rE   rF   Software.<lambda>  rH   rD   rI   rK   )rg   r  r  r  r   rC   Nr   rC   rD   rE   r  r    s     E	e%89	e45	z%e45	./	 !	!"	l>23	>#$	N$%	->K_ns-t uv	l?;<	_];<	)u=> K #OrD   r  c                       \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" SS94S\
" \" SSS95      4S\
" \5      4S\" S S94S\" SS94/5      rS
/rSrg)URLi  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_ah3hict2dez0>`__.
r7   r.   r/   r0   r1   r2   r4   r|   Tre   r;   r<   r=   r?   r@   c                      grB   rC   rC   rD   rE   rF   URL.<lambda>  rH   rD   rI   rK   rC   Nr   rC   rD   rE   r  r    s     E	e%89	e45	z%e45	.$/0	->K_ns-t uv	l?;<	_];<	)u=>	 	K $+)rD   r  c                   n    \ rS rSrSrSr\" S\" 5       4S\" \	5      4S\	" 5       4S\	" 5       4/5      r
Srg	)
UNIXAccountExti  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_hodiamlggpw5>`__.
zunix-account-extgidgroupshome_dirshellrC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r   r[   r]   rC   rD   rE   r  r    sK     E	!"	</0	^%&	."#	 KrD   r  c                      \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" 5       4S\" 5       4S\" 5       4S\
" \5      4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" \" SSS95      4S\" \5      4S\" S S94S\" SS94/5      r/ S QrS!rg")#UserAccounti  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_azo70vgj1vm2>`__.
r   r.   r/   r0   r1   r2   r4   user_id
credentialaccount_loginaccount_typer   is_service_accountis_privilegedcan_escalate_privsis_disabledaccount_createdaccount_expirescredential_last_changedaccount_first_loginaccount_last_loginr;   r<   r=   r?   r@   c                      grB   rC   rC   rD   rE   rF   UserAccount.<lambda>  rH   rD   rI   rK   )r  r  r  rC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r   r   r   r	   r   r   r   r   r   r[   r\   r]   rC   rD   rE   r  r    s2    E	e%89	e45	z%e45	N$%	~'(	.*+	*<89	)*	01	/+,	01	)*	-/0	-/0	"$5$78	 1 34	023	->K_ns-t uv	l?;<	_];<	)u=>+ K. #OrD   r  c                   ^    \ rS rSrSrSr\" S\" 5       4S\" 5       4S\" \	5      4/5      r
Srg)	WindowsRegistryValueTypei  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_u7n4ndghs3qq>`__.
zwindows-registry-value-typerg   data	data_typerC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r&   r[   r]   rC   rD   rE   r  r    sA     *E	!"	!"	l#<=> KrD   r  c                      \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\" 5       4S\
" \" \S95      4S\" 5       4S\" SSS94S\" 5       4S\
" \" SSS95      4S\
" \5      4S\" S S94S\" SS94/5      rS
S/rSrg)WindowsRegistryKeyi  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_luvw8wjlfo3y>`__.
zwindows-registry-keyr.   r/   r0   r1   r2   r4   rD  valuesr   modified_timer  r   r=   number_of_subkeysr;   r<   r?   r@   c                      grB   rC   rC   rD   rE   rF   WindowsRegistryKey.<lambda>  rH   rD   rI   rK   rC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r   r   r   r  r   r   r   r   r	   r   r[   r\   r]   rC   rD   rE   r  r    s     #E	e%89	e45	z%e45	 !	< 6<T UVW	+-.	.>X]^_	o/0	->K_ns-t uv	l?;<	_];<	)u=> K $)("3rD   r  c                   ,   \ rS rSrSrSr\" S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S	\" 5       4S
\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4/5      r	Sr
g)X509V3ExtensionsTypei  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_oudvonxzdlku>`__.
zx509-v3-extensions-typebasic_constraintsname_constraintspolicy_constraints	key_usageextended_key_usagesubject_key_identifierauthority_key_identifiersubject_alternative_nameissuer_alternative_namesubject_directory_attributescrl_distribution_pointsinhibit_any_policy#private_key_usage_period_not_before"private_key_usage_period_not_aftercertificate_policiespolicy_mappingsrC   N)rU   rV   rW   rX   rY   rZ   r   r   r   r[   r]   rC   rD   rE   r  r    s     &E	n./	^-.	~/0	n&'	~/0	!>#34	#^%56	#^%56	"N$45	')9:	"N$45	~/0	.0A0CD	-/@/BC	!12	N,-! KrD   r  c                     ^  \ rS rSrSrSr\" S\" \SS94S\" SS94S	\	" \SS94S
\
" 5       4S\" \SS94S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" 5       4S\" \S94S\" \" SSS95      4S\" \5      4S\
" S S94S\" SS94/5      rSS/rU 4S  jrS!rU =r$ )"X509Certificatei1  zFor more detailed information on this object's properties, see
`the STIX 2.1 specification <https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_8abcy1o5x9w1>`__.
zx509-certificater.   r/   r0   r1   r2   r4   is_self_signedr8   r   serial_numbersignature_algorithmissuervalidity_not_beforevalidity_not_afterr   subject_public_key_algorithmsubject_public_key_modulussubject_public_key_exponentx509_v3_extensionsr   r;   r<   r=   r?   r@   c                      grB   rC   rC   rD   rE   rF   X509Certificate.<lambda>J  rH   rD   rI   rK   c                 T   > [         [        U ]  5         / SQnU R                  U5        g )N)r  r8   r   r  r  r  r  r  r   r  r  r  r  )rM   r  rN   r   )rR   att_listrS   s     rE   rN   )X509Certificate._check_object_constraintsO  s'    ot>@
 	))(3rD   rC   )rU   rV   rW   rX   rY   rZ   r   r   r   r   r	   r   r!   r   r   r   r  r   r   r   r   r[   r\   rN   r]   r^   r_   s   @rE   r  r  1  s9    E	e%89	e45	z%e45	?,-	>"3%HI	N$%	.*+	 01	>#$	 1 34	023	N$%	')9:	%~'78	&(9:	5;OPQ	->K_ns-t uv	l?;<	_];<	)u=>) K, $,_"=
4 
4rD   r  c                     ^ ^^^ UUUU 4S jnU$ )a  Custom STIX Cyber Observable Object type decorator.

Example:
    >>> from stix2.v21 import CustomObservable
    >>> from stix2.properties import IntegerProperty, StringProperty
    >>> @CustomObservable('x-custom-observable', [
    ...     ('property1', StringProperty(required=True)),
    ...     ('property2', IntegerProperty()),
    ... ])
    ... class MyNewObservableType():
    ...     pass

c                   > [        [        R                  " S[        TSS94S[	        SS94S[        TSS94/TS[        [        SSS	95      4S
[        [        5      4S[        S S94S[        SS94/5      5      nT(       aN  [        T0 S9 " S S5      5       nTR                  S5      S   nUR                  SS5      nSU-   Ul        TU l        [!        U TUS["        T5      $ )Nr.   r/   r0   r1   r2   r4   r;   r<   r=   r?   r@   c                      grB   rC   rC   rD   rE   rF   3CustomObservable.<locals>.wrapper.<locals>.<lambda>v  s    rD   rI   rK   )r.   
propertiesc                       \ rS rSrSrSrg)8CustomObservable.<locals>.wrapper.<locals>.NameExtensioni|  znew-scorC   N)rU   rV   rW   rX   extension_typer]   rC   rD   rE   NameExtensionr  |  s    !*rD   r  z--r   - ExtensionDefinition)list	itertoolschainr   r   r   r   r   r   r	   r   r   splitreplacerU   with_extensionr   r   )clsr[   r  	extensionextension_nameid_contrib_propsr  r.   s       rE   wrapper!CustomObservable.<locals>.wrapperj  s   OO\$UCD#^%%@A:d?@
 *L9JWkz  :A  -B  C(,*GH!GH!#55#IJ	
  .R@+ + A+ ',,T215I!))#r2I%:Y%FM"!/C)#t[%VfggrD   rC   )r.   r  r  r  r  s   ```` rE   CustomObservabler  \  s    h h6 NrD   )zx-custom-observableNNN)SrY   collectionsr   r  customr   
exceptionsr   r   r  r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   baser   r   r   commonr   r   vocabr   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r+   ra   rl   ry   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r'  r,  rH  rL  rg  rq  rz  r  r  r  r  r  r  r  r  r  rC   rD   rE   <module>r     s   $  / J     7 6 4   ?{ ?:-{ -*+ +2, ,(,; ,*D D"%W; %WP	 		+ 		j 	Z Z ),+ ),X
{ 
 ,>; >D,+ ,*,+ ,*, ,&+K +&Z  	j 	I
 I<	Z 	4/[ 4/n
 "
 $)Zk )ZXO{ O0,+ ,&Z O+ O@
{ 
4 40; 4(4k (4V)rD   