
    =*f.                        S r SrSrSSKrS r " S S\5      r\" SS	S
S.5      r/ / SQPSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS /PS!S"/PS#S$/PS%S&/PS'S(/PS)S*/PS+S,/PS-S./P/ S/QPS0S1/PS2S3/PS4S5/PS6S7/PS8S9/PS:S;/PS<S=/P/ S>QPS?S@/PSASB/PSCSD/PSESF/PSGSH/PSISJ/P/ SKQPSLSM/PSNSO/PSPSQ/PSRSS/P/ STQPSUSV/PSWSX/PSYSZ/PS[S\/PS]S^/PS_S`/PSaSb/PScSd/PSeSf/PSgSh/PSiSj/PSkSl/PSmSn/PSoSp/PSqSr/PSsSt/PSuSv/PSwSx/PSySz/PS{S|/PS}S~/PSS/PSS/PSS/PSS/PSS/PSS/P/ SQPSS/PSS/PSS/PSS/PSS/PSS/P/ SQPSS/PSS/P/ SQPSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/PSS/P/ SQPSS/PSS/PSS/PSS/PSS/PSS/P/ SQPSS/PSS/PSS/PrS r	S r
S rg)zCyril Jaquierz Copyright (c) 2004 Cyril JaquierGPL    Nc                     [        U 5        g)z]Default output handler for printing protocol. 
Used to ease mocking in the test cases.
      N)print)ss    3/usr/lib/python3/dist-packages/fail2ban/protocol.pyoutputr      s     q    c                       \ rS rSrS rSrg)dotdict&   c                 
    X   $ )N )selfnames     r   __getattr__dotdict.__getattr__'   s
    	r	   r   N)__name__
__module____qualname____firstlineno__r   __static_attributes__r   r	   r   r   r   &   s    r	   r   r	   s   <F2B_END_COMMAND>s   <F2B_CLOSE_COMMAND>)EMPTYENDCLOSE) BASICr   startzstarts the server and the jailsrestartzrestarts the serverz&restart [--unban] [--if-exists] <JAIL>zBrestarts the jail <JAIL> (alias for 'reload --restart ... <JAIL>')z$reload [--restart] [--unban] [--all]zreloads the configuration without restarting of the server, the option '--restart' activates completely restarting of affected jails, thereby can unban IP addresses (if option '--unban' specified)z1reload [--restart] [--unban] [--if-exists] <JAIL>zIreloads the jail <JAIL>, or restarts it (if option '--restart' specified)stopz(stops all jails and terminate the serverzunban --allz3unbans all IP addresses (in all jails and database)zunban <IP> ... <IP>z'unbans <IP> (in all jails and database)bannedz*return jails with banned IPs as dictionaryzbanned <IP> ... <IP>]z4return list(s) of jails where given IP(s) are bannedstatusz%gets the current status of the serverzstatus --all [FLAVOR]zKgets the current status of all jails, with optional flavor or extended infozstat[istic]sz1gets the current statistics of all jails as tablepingztests if the server is aliveechoz;for internal usage, returns back and outputs a given stringhelpzreturn this outputversionzreturn the server version)r   LOGGINGr   zset loglevel <LEVEL>zsets logging level to <LEVEL>. Levels: CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACEDEBUG, HEAVYDEBUG or corresponding numeric value (50-5)zget loglevelzgets the logging levelzset logtarget <TARGET>zYsets logging target to <TARGET>. Can be STDOUT, STDERR, SYSLOG, SYSTEMD-JOURNAL or a filezget logtargetzgets logging targetzset syslogsocket auto|<SOCKET>zQsets the syslog socket path to auto or <SOCKET>. Only used if logtarget is SYSLOGzget syslogsocketzgets syslog socket path	flushlogszAflushes the logtarget if a file and reopens it. For log rotation.)r   DATABASEr   zset dbfile <FILE>zKset the location of fail2ban persistent datastore. Set to "None" to disablez
get dbfilez1get the location of fail2ban persistent datastorezset dbmaxmatches <INT>z<sets the max number of matches stored in database per ticketzget dbmaxmatchesz<gets the max number of matches stored in database per ticketzset dbpurgeage <SECONDS>z?sets the max age in <SECONDS> that history of bans will be keptzget dbpurgeagez=gets the max age in seconds that history of bans will be kept)r   zJAIL CONTROLr   zadd <JAIL> <BACKEND>zcreates <JAIL> using <BACKEND>zstart <JAIL>zstarts the jail <JAIL>zstop <JAIL>z*stops the jail <JAIL>. The jail is removedzstatus <JAIL> [FLAVOR]zHgets the current status of <JAIL>, with optional flavor or extended info)r   zJAIL CONFIGURATIONr   zset <JAIL> idle on|offzsets the idle state of <JAIL>z set <JAIL> ignoreself true|falsez'allows the ignoring of own IP addresseszset <JAIL> addignoreip <IP>z&adds <IP> to the ignore list of <JAIL>zset <JAIL> delignoreip <IP>z+removes <IP> from the ignore list of <JAIL>z set <JAIL> ignorecommand <VALUE>zsets ignorecommand of <JAIL>zset <JAIL> ignorecache <VALUE>zsets ignorecache of <JAIL>z%set <JAIL> addlogpath <FILE> ['tail']zmadds <FILE> to the monitoring list of <JAIL>, optionally starting at the 'tail' of the file (default 'head').zset <JAIL> dellogpath <FILE>z1removes <FILE> from the monitoring list of <JAIL>z!set <JAIL> logencoding <ENCODING>z/sets the <ENCODING> of the log files for <JAIL>z"set <JAIL> addjournalmatch <MATCH>z,adds <MATCH> to the journal filter of <JAIL>z"set <JAIL> deljournalmatch <MATCH>z1removes <MATCH> from the journal filter of <JAIL>zset <JAIL> addfailregex <REGEX>zHadds the regular expression <REGEX> which must match failures for <JAIL>zset <JAIL> delfailregex <INDEX>z7removes the regular expression at <INDEX> for failregexz!set <JAIL> addignoreregex <REGEX>zTadds the regular expression <REGEX> which should match pattern to exclude for <JAIL>z!set <JAIL> delignoreregex <INDEX>z9removes the regular expression at <INDEX> for ignoreregexzset <JAIL> findtime <TIME>zPsets the number of seconds <TIME> for which the filter will look back for <JAIL>zset <JAIL> bantime <TIME>zBsets the number of seconds <TIME> a host will be banned for <JAIL>z set <JAIL> datepattern <PATTERN>z6sets the <PATTERN> used to match date/times for <JAIL>zset <JAIL> usedns <VALUE>zsets the usedns mode for <JAIL>z3set <JAIL> attempt <IP> [<failure1> ... <failureN>]z"manually notify about <IP> failurezset <JAIL> banip <IP> ... <IP>zmanually Ban <IP> for <JAIL>z2set <JAIL> unbanip [--report-absent] <IP> ... <IP>zmanually Unban <IP> in <JAIL>zset <JAIL> maxretry <RETRY>zFsets the number of failures <RETRY> before banning the host for <JAIL>zset <JAIL> maxmatches <INT>zDsets the max number of matches stored in memory per ticket in <JAIL>zset <JAIL> maxlines <LINES>z@sets the number of <LINES> to buffer for regex search for <JAIL>z6set <JAIL> addaction <ACT>[ <PYTHONFILE> <JSONKWARGS>]zadds a new action named <ACT> for <JAIL>. Optionally for a Python based action, a <PYTHONFILE> and <JSONKWARGS> can be specified, else will be a Command Actionzset <JAIL> delaction <ACT>z$removes the action <ACT> from <JAIL>)r   zCOMMAND ACTION CONFIGURATIONr   z)set <JAIL> action <ACT> actionstart <CMD>z;sets the start command <CMD> of the action <ACT> for <JAIL>z(set <JAIL> action <ACT> actionstop <CMD>z:sets the stop command <CMD> of the action <ACT> for <JAIL>z)set <JAIL> action <ACT> actioncheck <CMD>z;sets the check command <CMD> of the action <ACT> for <JAIL>z'set <JAIL> action <ACT> actionban <CMD>z9sets the ban command <CMD> of the action <ACT> for <JAIL>z)set <JAIL> action <ACT> actionunban <CMD>z;sets the unban command <CMD> of the action <ACT> for <JAIL>z)set <JAIL> action <ACT> timeout <TIMEOUT>zPsets <TIMEOUT> as the command timeout in seconds for the action <ACT> for <JAIL>)r   zGENERAL ACTION CONFIGURATIONr   z*set <JAIL> action <ACT> <PROPERTY> <VALUE>z>sets the <VALUE> of <PROPERTY> for the action <ACT> for <JAIL>z/set <JAIL> action <ACT> <METHOD>[ <JSONKWARGS>]zDcalls the <METHOD> with <JSONKWARGS> for the action <ACT> for <JAIL>)r   zJAIL INFORMATIONr   zget <JAIL> bannedzreturn banned IPs of <JAIL>z get <JAIL> banned <IP> ... <IP>]zQreturn 1 if IP is banned in <JAIL> otherwise 0, or a list of 1/0 for multiple IPszget <JAIL> logpathz/gets the list of the monitored files for <JAIL>zget <JAIL> logencodingz-gets the encoding of the log files for <JAIL>zget <JAIL> journalmatchz(gets the journal filter match for <JAIL>zget <JAIL> ignoreselfz;gets the current value of the ignoring the own IP addresseszget <JAIL> ignoreipz0gets the list of ignored IP addresses for <JAIL>zget <JAIL> ignorecommandzgets ignorecommand of <JAIL>zget <JAIL> failregexzJgets the list of regular expressions which matches the failures for <JAIL>zget <JAIL> ignoreregexzPgets the list of regular expressions which matches patterns to ignore for <JAIL>zget <JAIL> findtimezIgets the time for which the filter will look back for failures for <JAIL>zget <JAIL> bantimez)gets the time a host is banned for <JAIL>zget <JAIL> datepatternz4gets the pattern used to match date/times for <JAIL>zget <JAIL> usednsz"gets the usedns setting for <JAIL>z$get <JAIL> banip [<SEP>|--with-time]zgets the list of of banned IP addresses for <JAIL>. Optionally the separator character ('<SEP>', default is space) or the option '--with-time' (printing the times of ban) may be specified. The IPs are ordered by end of ban.zget <JAIL> maxretryz.gets the number of failures allowed for <JAIL>zget <JAIL> maxmatcheszDgets the max number of matches stored in memory per ticket in <JAIL>zget <JAIL> maxlinesz-gets the number of lines to buffer for <JAIL>zget <JAIL> actionsz!gets a list of actions for <JAIL>)r   zCOMMAND ACTION INFORMATIONr   z#get <JAIL> action <ACT> actionstartz6gets the start command for the action <ACT> for <JAIL>z"get <JAIL> action <ACT> actionstopz5gets the stop command for the action <ACT> for <JAIL>z#get <JAIL> action <ACT> actioncheckz6gets the check command for the action <ACT> for <JAIL>z!get <JAIL> action <ACT> actionbanz4gets the ban command for the action <ACT> for <JAIL>z#get <JAIL> action <ACT> actionunbanz6gets the unban command for the action <ACT> for <JAIL>zget <JAIL> action <ACT> timeoutzCgets the command timeout in seconds for the action <ACT> for <JAIL>)r   zGENERAL ACTION INFORMATIONr   z!get <JAIL> actionproperties <ACT>z9gets a list of properties for the action <ACT> for <JAIL>zget <JAIL> actionmethods <ACT>z6gets a list of methods for the action <ACT> for <JAIL>z"get <JAIL> action <ACT> <PROPERTY>z<gets the value of <PROPERTY> for the action <ACT> for <JAIL>c            	         Sn SnSnSn[          H  nUS   S:X  a  U(       a  [        S5        SnSn[        US   5      U:  a  SU-  US	   -   US	'   [        R                  " US	   USS
9 Ha  nU(       a4  SU -  US   -   SU[        US   5      -
  -  -   UR                  5       -   nSnOSX-   -  UR                  5       -   n[        U5        Mc     M     g )N   )   "   Fr   r   T    )drop_whitespace)protocolr   lentextwrapwrapstrip)INDENTMARGINWIDTHfirstHeadingmfirstnlines           r   printFormattedr=      s    	
	
QqTRZL	":,
%1Y&
+!
1Q4==1ue<a<!A$QqT(:!;;aggiGDE&/"QWWY.D	$< = r	   c                      Sn [          HY  nUS   S:X  a(  U (       a  [        S5        [        US   US   5        Sn M4  [        S5        [        S	US   -   S
-   US   -   5        M[     [        S5        g )NFr   r   z|}r.      Tz|-z(| <span style="white-space:nowrap;"><tt>z</tt></span> || || )r0   r   __printWikiHeader)r8   r9   s     r   	printWikirA      sq    
QqTRZ
4LQqT1Q4 <	$<	
61
=@U
UXYZ[X\
\]  r	   c                     [        S5        [        SU -   S-   5        [        S5        [        U5        [        S5        [        S5        [        S5        g )Nr   z=== z ===z{|z'| '''Command''' || || '''Description''')r   )sectiondescs     r   r@   r@      s@    6!"12r	   )
__author____copyright____license__r2   r   dictr   CSPROTOr0   r=   rA   r@   r   r	   r   <module>rJ      s  . 
2 
d  ! m m
+ ,m ! "m *+o p	m
 (  *p  qm 5  7B  Cm 	3 4m E Fm A Bm 
7 8m P Qm 
2 3m g hm D Em 	' (m  	F G!m" 	 #m$ ' (%m& 'm(  G H)m, ) *-m. v w/m0 ' (1m2 "#v w3m4 . /5m6 Q R7m8 9m: e f;m< B C=m> Y Z?m@ S TAmB ^ _CmD R SEmF GmH 9 :ImJ ) *KmL < =MmN e fOmP QmR : ;SmT $%N OUmV  H IWmX  M NYmZ $%C D[m\ "#? @]m^ )  +Z  [_m`  !T Uamb %&W Xcmd &'U Vemf &'Z [gmh #$n oimj #$] ^kml %&| }mmn %&a bomp q rqmr b csmt $%] ^umv ? @wmx 78\ ]ymz "#A B{m| 67V W}m~  h im@  f gAmB  b cCmD :  <]  ^EmF E FGmH )ImJ -.k lKmL ,-i jMmN -.k lOmP +,g hQmR -.k lSmT -  /A  BUmV )WmX ./o pYmZ 34z {[m\ ]m^ 3 4_m` $%x yamb H Icmd J Kemf F Ggmh W Ximj J Kkml ; <mmn e fomp m nqmr c dsmt B Cumv Q Rwmx : ;ymz (  *K  L{m| H I}m~ ` am@ G HAmB : ;CmD &EmF '(` aGmH &'^ _ImJ '(` aKmL %&\ ]MmN '(` aOmP #$i jQmR 'SmT %&a bUmV "#[ \WmX &'e fYmh03r	   