%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/fail2ban/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/fail2ban/protocol.pyc

�
��&dcj@sRdZdZdZddlZd�Zdefd��YZeidd	6d
d6dd
6�Zdddgddgddgddgddgddgddgddgddgdd gd!d"gd#d$gd%d&gd'd(gd)d*gd+d,gdd-dgd.d/gd0d1gd2d3gd4d5gd6d7gd8d9gd:d;gdd<dgd=d>gd?d@gdAdBgdCdDgdEdFgdGdHgddIdgdJdKgdLdMgdNdOgdPdQgddRdgdSdTgdUdVgdWdXgdYdZgd[d\gd]d^gd_d`gdadbgdcddgdedfgdgdhgdidjgdkdlgdmdngdodpgdqdrgdsdtgdudvgdwdxgdydzgd{d|gd}d~gdd�gd�d�gd�d�gd�d�gd�d�gdd�dgd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gdd�dgd�d�gd�d�gdd�dgd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gdd�dgd�d�gd�d�gd�d�gd�d�gd�d�gd�d�gdd�dgd�d�gd�d�gd�d�ggiZd��Z	d��Z
d��ZdS(�s
Cyril Jaquiers Copyright (c) 2004 Cyril JaquiertGPLi����NcCs	|GHdS(sZDefault output handler for printing protocol. 
  Used to ease mocking in the test cases.
	N((ts((s5/usr/lib/python2.7/site-packages/fail2ban/protocol.pytoutputstdotdictcBseZd�ZRS(cCs||S(N((tselftname((s5/usr/lib/python2.7/site-packages/fail2ban/protocol.pyt__getattr__'s(t__name__t
__module__R(((s5/usr/lib/python2.7/site-packages/fail2ban/protocol.pyR&sttEMPTYs<F2B_END_COMMAND>tENDs<F2B_CLOSE_COMMAND>tCLOSEtBASICtstartsstarts the server and the jailstrestartsrestarts the servers&restart [--unban] [--if-exists] <JAIL>sBrestarts the jail <JAIL> (alias for 'reload --restart ... <JAIL>')s$reload [--restart] [--unban] [--all]s�reloads 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)s1reload [--restart] [--unban] [--if-exists] <JAIL>sIreloads the jail <JAIL>, or restarts it (if option '--restart' specified)tstops(stops all jails and terminate the serversunban --alls3unbans all IP addresses (in all jails and database)sunban <IP> ... <IP>s'unbans <IP> (in all jails and database)tbanneds*return jails with banned IPs as dictionarysbanned <IP> ... <IP>]s4return list(s) of jails where given IP(s) are bannedtstatuss%gets the current status of the servertpingstests if the server is alivetechos;for internal usage, returns back and outputs a given stringthelpsreturn this outputtversionsreturn the server versiontLOGGINGsset loglevel <LEVEL>s�sets logging level to <LEVEL>. Levels: CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACEDEBUG, HEAVYDEBUG or corresponding numeric value (50-5)sget loglevelsgets the logging levelsset logtarget <TARGET>sHsets logging target to <TARGET>. Can be STDOUT, STDERR, SYSLOG or a files
get logtargetsgets logging targetsset syslogsocket auto|<SOCKET>sQsets the syslog socket path to auto or <SOCKET>. Only used if logtarget is SYSLOGsget syslogsocketsgets syslog socket patht	flushlogssAflushes the logtarget if a file and reopens it. For log rotation.tDATABASEsset dbfile <FILE>sKset the location of fail2ban persistent datastore. Set to "None" to disables
get dbfiles1get the location of fail2ban persistent datastoresset dbmaxmatches <INT>s<sets the max number of matches stored in database per ticketsget dbmaxmatchess<gets the max number of matches stored in database per ticketsset dbpurgeage <SECONDS>s?sets the max age in <SECONDS> that history of bans will be keptsget dbpurgeages=gets the max age in seconds that history of bans will be keptsJAIL CONTROLsadd <JAIL> <BACKEND>screates <JAIL> using <BACKEND>sstart <JAIL>sstarts the jail <JAIL>sstop <JAIL>s*stops the jail <JAIL>. The jail is removedsstatus <JAIL> [FLAVOR]sHgets the current status of <JAIL>, with optional flavor or extended infosJAIL CONFIGURATIONsset <JAIL> idle on|offssets the idle state of <JAIL>s set <JAIL> ignoreself true|falses'allows the ignoring of own IP addressessset <JAIL> addignoreip <IP>s&adds <IP> to the ignore list of <JAIL>sset <JAIL> delignoreip <IP>s+removes <IP> from the ignore list of <JAIL>s set <JAIL> ignorecommand <VALUE>ssets ignorecommand of <JAIL>sset <JAIL> ignorecache <VALUE>ssets ignorecache of <JAIL>s%set <JAIL> addlogpath <FILE> ['tail']smadds <FILE> to the monitoring list of <JAIL>, optionally starting at the 'tail' of the file (default 'head').sset <JAIL> dellogpath <FILE>s1removes <FILE> from the monitoring list of <JAIL>s!set <JAIL> logencoding <ENCODING>s/sets the <ENCODING> of the log files for <JAIL>s"set <JAIL> addjournalmatch <MATCH>s,adds <MATCH> to the journal filter of <JAIL>s"set <JAIL> deljournalmatch <MATCH>s1removes <MATCH> from the journal filter of <JAIL>sset <JAIL> addfailregex <REGEX>sHadds the regular expression <REGEX> which must match failures for <JAIL>sset <JAIL> delfailregex <INDEX>s7removes the regular expression at <INDEX> for failregexs!set <JAIL> addignoreregex <REGEX>sTadds the regular expression <REGEX> which should match pattern to exclude for <JAIL>s!set <JAIL> delignoreregex <INDEX>s9removes the regular expression at <INDEX> for ignoreregexsset <JAIL> findtime <TIME>sPsets the number of seconds <TIME> for which the filter will look back for <JAIL>sset <JAIL> bantime <TIME>sBsets the number of seconds <TIME> a host will be banned for <JAIL>s set <JAIL> datepattern <PATTERN>s6sets the <PATTERN> used to match date/times for <JAIL>sset <JAIL> usedns <VALUE>ssets the usedns mode for <JAIL>s3set <JAIL> attempt <IP> [<failure1> ... <failureN>]s"manually notify about <IP> failuresset <JAIL> banip <IP> ... <IP>smanually Ban <IP> for <JAIL>s2set <JAIL> unbanip [--report-absent] <IP> ... <IP>smanually Unban <IP> in <JAIL>sset <JAIL> maxretry <RETRY>sFsets the number of failures <RETRY> before banning the host for <JAIL>sset <JAIL> maxmatches <INT>sDsets the max number of matches stored in memory per ticket in <JAIL>sset <JAIL> maxlines <LINES>s@sets the number of <LINES> to buffer for regex search for <JAIL>s6set <JAIL> addaction <ACT>[ <PYTHONFILE> <JSONKWARGS>]s�adds 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 Actionsset <JAIL> delaction <ACT>s$removes the action <ACT> from <JAIL>sCOMMAND ACTION CONFIGURATIONs)set <JAIL> action <ACT> actionstart <CMD>s;sets the start command <CMD> of the action <ACT> for <JAIL>s(set <JAIL> action <ACT> actionstop <CMD>s:sets the stop command <CMD> of the action <ACT> for <JAIL>s)set <JAIL> action <ACT> actioncheck <CMD>s;sets the check command <CMD> of the action <ACT> for <JAIL>s'set <JAIL> action <ACT> actionban <CMD>s9sets the ban command <CMD> of the action <ACT> for <JAIL>s)set <JAIL> action <ACT> actionunban <CMD>s;sets the unban command <CMD> of the action <ACT> for <JAIL>s)set <JAIL> action <ACT> timeout <TIMEOUT>sPsets <TIMEOUT> as the command timeout in seconds for the action <ACT> for <JAIL>sGENERAL ACTION CONFIGURATIONs*set <JAIL> action <ACT> <PROPERTY> <VALUE>s>sets the <VALUE> of <PROPERTY> for the action <ACT> for <JAIL>s/set <JAIL> action <ACT> <METHOD>[ <JSONKWARGS>]sDcalls the <METHOD> with <JSONKWARGS> for the action <ACT> for <JAIL>sJAIL INFORMATIONsget <JAIL> bannedsreturn banned IPs of <JAIL>s get <JAIL> banned <IP> ... <IP>]sQreturn 1 if IP is banned in <JAIL> otherwise 0, or a list of 1/0 for multiple IPssget <JAIL> logpaths/gets the list of the monitored files for <JAIL>sget <JAIL> logencodings-gets the encoding of the log files for <JAIL>sget <JAIL> journalmatchs(gets the journal filter match for <JAIL>sget <JAIL> ignoreselfs;gets the current value of the ignoring the own IP addressessget <JAIL> ignoreips0gets the list of ignored IP addresses for <JAIL>sget <JAIL> ignorecommandsgets ignorecommand of <JAIL>sget <JAIL> failregexsJgets the list of regular expressions which matches the failures for <JAIL>sget <JAIL> ignoreregexsPgets the list of regular expressions which matches patterns to ignore for <JAIL>sget <JAIL> findtimesIgets the time for which the filter will look back for failures for <JAIL>sget <JAIL> bantimes)gets the time a host is banned for <JAIL>sget <JAIL> datepatterns3gets the patern used to match date/times for <JAIL>sget <JAIL> usednss"gets the usedns setting for <JAIL>s$get <JAIL> banip [<SEP>|--with-time]s�gets 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.sget <JAIL> maxretrys.gets the number of failures allowed for <JAIL>sget <JAIL> maxmatchessDgets the max number of matches stored in memory per ticket in <JAIL>sget <JAIL> maxliness-gets the number of lines to buffer for <JAIL>sget <JAIL> actionss!gets a list of actions for <JAIL>sCOMMAND ACTION INFORMATIONs#get <JAIL> action <ACT> actionstarts6gets the start command for the action <ACT> for <JAIL>s"get <JAIL> action <ACT> actionstops5gets the stop command for the action <ACT> for <JAIL>s#get <JAIL> action <ACT> actionchecks6gets the check command for the action <ACT> for <JAIL>s!get <JAIL> action <ACT> actionbans4gets the ban command for the action <ACT> for <JAIL>s#get <JAIL> action <ACT> actionunbans6gets the unban command for the action <ACT> for <JAIL>sget <JAIL> action <ACT> timeoutsCgets the command timeout in seconds for the action <ACT> for <JAIL>sGENERAL ACTION INFORMATIONs!get <JAIL> actionproperties <ACT>s9gets a list of properties for the action <ACT> for <JAIL>sget <JAIL> actionmethods <ACT>s6gets a list of methods for the action <ACT> for <JAIL>s"get <JAIL> action <ACT> <PROPERTY>s<gets the value of <PROPERTY> for the action <ACT> for <JAIL>c	Csd}d}d}t}x�tD]�}|ddkrH|rHtd�nt}t}t|d�|kr�d||d|d<nx�tj|d|dt�D]i}|r�d||dd|t|d�|j�}t}nd|||j�}t|�q�WqWdS(	Nii)i"iR	t itdrop_whitespace(tFalsetprotocolRtTruetlenttextwraptwraptstrip(tINDENTtMARGINtWIDTHtfirstHeadingtmtfirsttntline((s5/usr/lib/python2.7/site-packages/fail2ban/protocol.pytprintFormatted�s"

#2	cCs�t}xwtD]o}|ddkrT|r6td�nt|d|d�t}q
td�td|dd|d�q
Wtd�dS(	NiR	s|}iis|-s(| <span style="white-space:nowrap;"><tt>s</tt></span> || || (RRRt__printWikiHeaderR(R&R'((s5/usr/lib/python2.7/site-packages/fail2ban/protocol.pyt	printWiki�s

	
"cCsRtd�td|d�td�t|�td�td�td�dS(NR	s=== s ===s{|s'| '''Command''' || || '''Description'''(R(tsectiontdesc((s5/usr/lib/python2.7/site-packages/fail2ban/protocol.pyR,�s




(t
__author__t
__copyright__t__license__R RtdictRtCSPROTORR+R-R,(((s5/usr/lib/python2.7/site-packages/fail2ban/protocol.pyt<module>s�		
																																																																																																

Zerion Mini Shell 1.0