+
    #fd                         R t ^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RIH	t	 ^ RI
t
]
P                  ^ ,          ^8  d   ^ RItM^ RItR tR tR tR tR tR	 tR# )
z'applications.py: common classes for ufwN)debugwarn)UFWErrorc                8	   \         P                  P                  V 4      '       g   \        R4      p\	        V4      hRp/ p\         P
                  ! V 4      pVP                  4        ^ p\        P                  ! R4      pV EF  pV R,           V,           p\         P                  P                  V4      '       g   K;  VP                  V4      '       d   \        RV,          4       Kf  VP                  R4      '       gt   VP                  R4      '       g]   VP                  R4      '       gF   VP                  R	4      '       g/   VP                  R
4      '       g   VP                  R4      '       d   \        RV,          4       EK  ^ p	 \         P                  ! V4      \        P                  ,          p	Y8  d!   \        R4      T,          p
\!        T
4       EKY  YY,           T8  d!   \        R4      T,          p
\!        T
4       EK  YY,          p\"        P$                  ^ ,          ^8  d   \&        P(                  ! 4       pM\*        P(                  ! 4       p TP-                  T4       TP/                  4        F  p\1        T4      ^@8  d    \        R4      T,          p
\!        T
4       K2  \3        T4      '       g    \        R4      T,          p
\!        T
4       Kb   \4        P6                  P9                  T4       \        R4      T,          p
\!        T
4       K  	  EK  	  V#   \         d#    \        R4      T,          p
\!        T
4        EK  i ; i  \         d#    \        R4      T,          p
\!        T
4        EK  i ; i  \         d     Mi ; iRpTP;                  T4       Fk  w  r\1        T4      ^@8  d"   \        R4      T,          p
\!        T
4       Rp M9\1        T4      R8  g   KH  \        R4      RTRT/,          p
\!        T
4       Rp M	  T'       d   EK  Y9   d   \        R4      T,          p
\!        T
4       / pTP;                  T4       F
  w  rTTT&   K  	   \=        TT4       TY<&   EK     \         d   p\!        T4        Rp?EK  Rp?ii ; i)zlGet profiles found in profiles database.  Returns dictionary with
profile name as key and tuples for fields
z!Profiles directory does not existi   z^\./zSkipping '%s': hidden filez	.dpkg-newz	.dpkg-oldz
.dpkg-distz.rpmnewz.rpmsave~zSkipping '%s'zSkipping '%s': couldn't statzSkipping '%s': too bigz*Skipping '%s': too many files read alreadyzSkipping '%s': couldn't processzSkipping '%s': name too longzSkipping '%s': invalid namez$Skipping '%s': also in /etc/servicesFzSkipping '%s': field too longTz4Skipping '%(value)s': value too long for '%(field)s'valuefieldz(Duplicate profile '%s', using last foundNi   )ospathisdir_r   listdirsortrecompileisfilesearchr   endswithstatST_SIZE	Exceptionr   sysversion_infoConfigParserRawConfigParserconfigparserreadsectionslenvalid_profile_nameufwutilget_services_protoitemsverify_profile)profiles_direrr_msgmax_sizeprofilesfiles
total_sizepatfabs_pathsizewarn_msgcdictpskipkeyr   pdictes   &                 2/usr/lib/python3/dist-packages/ufw/applications.pyget_profilesr8       s    77==&&78wHHJJ|$E	JJLJ
**V
C#%)ww~~h''::a==.!45::k""ajj&=&=::l##qzz)'<'<::j!!QZZ__/Q'( 	778$T\\2D ?12a8HNx'EF!LHN
A" 002E 002E	JJx  !A1v{;<BX%a((:;qAX++A.CDJX "e J Oc  	78A>HN	0  	:;qAHN	,   D#kk!n
s8b= !@AQGHNDu:$  "/  0#*Aw"< >H ND - }GHANXE#kk!n
"c
 -q%(# QsN   +L!M<N!(MM(M>=M>NN$Q77RRRc                    V R8X  d   R#  \        V 4       R#   \         d     Mi ; i\        P                  ! RT 4      '       d   R# R# )z0Only accept a limited set of characters for nameallFz ^[a-zA-Z0-9][a-zA-Z0-9 _\-\.+]*$T)intr   r   match)names   &r7   r    r       sI     u}D	 
 
xx3T::s    &&c                ^   . ROpV FY  pW19  d"   \        R4      RV RV/,          p\        V4      hW,          '       d   K:  \        R4      RV RV/,          p\        V4      h	  VR,          P                  R4      p V Fo  p\        P                  P                  V4      w  rxVR8X  d   RV9   g   R	V9   d   \        X4      h\        P                  P                  R
W4      p	\        V	4       Kq  	  R#   \         d.   p
\        T
4       \        R4      T ,          p\        T4      hRp
?
ii ; i)z'Make sure profile has everything neededportsz/Profile '%(fn)s' missing required field '%(f)s'fnr-   z1Profile '%(fn)s' has empty required field '%(f)s'|any:,ACCEPTzInvalid ports in profile '%s'NT)titledescriptionr?   )
r   r   splitr!   r"   parse_port_protocommonUFWRuler   r   )r=   profile
app_fieldsr-   r'   r?   r2   portprotoruler6   s   &&         r7   r%   r%      s   2JIJc1-/G 7##KL $Q/1G7##  G""3'E AHH55a8MT~3$;#+w''::%%h<D$K     a34=w s   =A5C4 4D,?(D''D,c                F    RpRpW 9   d   W,          '       d	   W,          pV# )z#Retrieve the title from the profile rF    rL   sr	   s   &  r7   	get_titlerV      s$    
AEGNNNH    c                F    RpRpW 9   d   W,          '       d	   W,          pV# )z)Retrieve the description from the profilerR   rG   rS   rT   s   &  r7   get_descriptionrY      s$    
AEGNNNHrW   c                d    . pRpW 9   d&   W,          '       d   W,          P                  R4      pV# )z'Retrieve a list of ports from a profiler?   rA   )rH   )rL   r?   r	   s   &  r7   	get_portsr[      s/    EEGNN$$S)LrW   )__doc__r
   r   r   ufw.utilr!   r   r   
ufw.commonr   r   r   r   r   r8   r    r%   rV   rY   r[   rS   rW   r7   <module>r_      sY    -" 
 	      
Aup(@rW   