ܜ^cf@s.dZdZdZddlZdZdefdYZeidd 6d d 6d d 6Zdddgddgddgddgddgddgddgddgddgdd gd!d"gd#d$gd%d&gd'd(gdd)dgd*d+gd,d-gd.d/gd0d1gd2d3gd4d5gd6d7gdd8dgd9d:gd;d<gd=d>gd?d@gdAdBgdCdDgddEdgdFdGgdHdIgdJdKgdLdMgddNdgdOdPgdQdRgdSdTgdUdVgdWdXgdYdZgd[d\gd]d^gd_d`gdadbgdcddgdedfgdgdhgdidjgdkdlgdmdngdodpgdqdrgdsdtgdudvgdwdxgdydzgd{d|gd}d~gddgddgddgdddgddgddgddgddgddgddgdddgddgddgdddgddgddgddgddgddgddgddgddgddgddgddgddgddgddgddgddgddgdddgddgddgddgddgddgddgdddgddgddgddggeZdZ dZ dZ dS(s Cyril Jaquiers Copyright (c) 2004 Cyril JaquiertGPLiNcCs |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.pytoutputstdotdictcBseZdZRS(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&sttEMPTYstENDstCLOSEtBASICtstartsstarts the server and the jailstrestartsrestarts the servers&restart [--unban] [--if-exists] sBrestarts the jail (alias for 'reload --restart ... ')s$reload [--restart] [--unban] [--all]sreloads 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] sIreloads the jail , or restarts it (if option '--restart' specified)tstops(stops all jails and terminate the servers unban --alls3unbans all IP addresses (in all jails and database)sunban ... s'unbans (in all jails and database)tstatuss%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 ssets logging level to . Levels: CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACEDEBUG, HEAVYDEBUG or corresponding numeric value (50-5)s get loglevelsgets the logging levelsset logtarget sHsets logging target to . Can be STDOUT, STDERR, SYSLOG or a files get logtargetsgets logging targetsset syslogsocket auto|sQsets the syslog socket path to auto or . Only used if logtarget is SYSLOGsget syslogsocketsgets syslog socket patht flushlogssAflushes the logtarget if a file and reopens it. For log rotation.tDATABASEsset dbfile sKset the location of fail2ban persistent datastore. Set to "None" to disables get dbfiles1get the location of fail2ban persistent datastoresset dbmaxmatches 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 s?sets the max age in that history of bans will be keptsget dbpurgeages=gets the max age in seconds that history of bans will be kepts JAIL CONTROLsadd screates using s start sstarts the jail s stop s*stops the jail . The jail is removedsstatus [FLAVOR]sHgets the current status of , with optional flavor or extended infosJAIL CONFIGURATIONsset idle on|offssets the idle state of s set ignoreself true|falses'allows the ignoring of own IP addressessset addignoreip s&adds to the ignore list of sset delignoreip s+removes from the ignore list of s set ignorecommand ssets ignorecommand of sset ignorecache ssets ignorecache of s%set addlogpath ['tail']smadds to the monitoring list of , optionally starting at the 'tail' of the file (default 'head').sset dellogpath s1removes from the monitoring list of s!set logencoding s/sets the of the log files for s"set addjournalmatch s,adds to the journal filter of s"set deljournalmatch s1removes from the journal filter of sset addfailregex sHadds the regular expression which must match failures for sset delfailregex s7removes the regular expression at for failregexs!set addignoreregex sTadds the regular expression which should match pattern to exclude for s!set delignoreregex s9removes the regular expression at for ignoreregexsset findtime