=========================================================== .___ __ __ _________________ __ __ __| _/|__|/ |_ / ___\_` __ \__ \ | | \/ __ | | \\_ __\ / /_/ > | \// __ \| | / /_/ | | || | \___ /|__| (____ /____/\____ | |__||__| /_____/ \/ \/ grep rough audit - static analysis tool v2.8 written by @Wireghoul =================================[justanotherhacker.com]=== fail2ban-0.11.1/ChangeLog-445- - `<F-...>` - interpolates to the corresponding filter group capture `...` fail2ban-0.11.1/ChangeLog:446: - `<fq-hostname>` - fully-qualified name of host (the same as `$(hostname -f)`) fail2ban-0.11.1/ChangeLog:447: - `<sh-hostname>` - short hostname (the same as `$(uname -n)`) fail2ban-0.11.1/ChangeLog-448-* Introduced new action command `actionprolong` to prolong ban-time (e. g. set new timeout if expected); ############################################## fail2ban-0.11.1/ChangeLog-494-* Config reader's: introduced new syntax `%(section/option)s`, in opposite to extended interpolation of fail2ban-0.11.1/ChangeLog:495: python 3 `${section:option}` work with all supported python version in fail2ban and this syntax is fail2ban-0.11.1/ChangeLog-496- like our another features like `%(known/option)s`, etc. (gh-1750) ############################################## fail2ban-0.11.1/config/action.d/dshield.conf-70-actionban = TZONE=`date +%%z | sed 's/\([+-]..\)\(..\)/\1:\2/'` fail2ban-0.11.1/config/action.d/dshield.conf:71: DATETIME="`perl -e '@t=localtime(<time>);printf "%%4d-%%02d-%%02d %%02d:%%02d:%%02d",1900+$t[5],$t[4]+1,$t[3],$t[2],$t[1],$t[0]'` $TZONE" fail2ban-0.11.1/config/action.d/dshield.conf:72: PROTOCOL=`awk '{IGNORECASE=1;if($1=="<protocol>"){print $2;exit}}' /etc/protocols` fail2ban-0.11.1/config/action.d/dshield.conf-73- if [ -z "$PROTOCOL" ]; then PROTOCOL=<protocol>; fi ############################################## fail2ban-0.11.1/config/action.d/ipfw.conf-45-# fail2ban-0.11.1/config/action.d/ipfw.conf:46:actionunban = ipfw delete `ipfw list | grep -i "[^0-9]<ip>[^0-9]" | awk '{print $1;}'` fail2ban-0.11.1/config/action.d/ipfw.conf-47- ############################################## fail2ban-0.11.1/config/action.d/mynetwatchman.conf-60-# fail2ban-0.11.1/config/action.d/mynetwatchman.conf:61:actionban = MNWLOGIN=`perl -e '$s=shift;$s=~s/([\W])/"%%".uc(sprintf("%%2.2x",ord($1)))/eg;print $s' '<mnwlogin>'` fail2ban-0.11.1/config/action.d/mynetwatchman.conf:62: MNWPASS=`perl -e '$s=shift;$s=~s/([\W])/"%%".uc(sprintf("%%2.2x",ord($1)))/eg;print $s' '<mnwpass>'` fail2ban-0.11.1/config/action.d/mynetwatchman.conf:63: PROTOCOL=`awk '{IGNORECASE=1;if($1=="<protocol>"){print $2;exit}}' /etc/protocols` fail2ban-0.11.1/config/action.d/mynetwatchman.conf-64- if [ -z "$PROTOCOL" ]; then PROTOCOL=<protocol>; fi fail2ban-0.11.1/config/action.d/mynetwatchman.conf:65: DATETIME=`perl -e '@t=gmtime(<time>);printf "%%4d-%%02d-%%02d+%%02d:%%02d:%%02d",1900+$t[5],$t[4]+1,$t[3],$t[2],$t[1],$t[0]'` fail2ban-0.11.1/config/action.d/mynetwatchman.conf-66- <getcmd> "<mnwurl>?AT=2&AV=0&AgentEmail=$MNWLOGIN&AgentPassword=$MNWPASS&AttackerIP=<ip>&SrcPort=<srcport>&ProtocolID=$PROTOCOL&DestPort=<port>&AttackCount=<failures>&VictimIP=<myip>&AttackDateTime=$DATETIME" 2>&1 >> <tmpfile>.out && grep -q 'Attack Report Insert Successful' <tmpfile>.out && rm -f <tmpfile>.out ############################################## fail2ban-0.11.1/config/action.d/osx-ipfw.conf-46-# fail2ban-0.11.1/config/action.d/osx-ipfw.conf:47:actionunban = ipfw delete `ipfw -S list | grep -i 'set <setnum> <blocktype> log <block> from <ip> to <dst>' | awk '{print $1;}'` fail2ban-0.11.1/config/action.d/osx-ipfw.conf-48- ############################################## fail2ban-0.11.1/config/action.d/osx-ipfw.conf-83-# Values: Random value between 10000 and 12000 fail2ban-0.11.1/config/action.d/osx-ipfw.conf:84:rulenum="`echo $((RANDOM%%2000+10000))`" fail2ban-0.11.1/config/action.d/osx-ipfw.conf-85- fail2ban-0.11.1/config/action.d/osx-ipfw.conf-86-# Duplicate prevention mechanism fail2ban-0.11.1/config/action.d/osx-ipfw.conf:87:#rulenum = "`a=$((RANDOM%%2000+10000)); while ipfw show | grep -q ^$a\ ; do a=$((RANDOM%%2000+10000)); done; echo $a`" ############################################## fail2ban-0.11.1/config/action.d/smtp.py-153- msg['Subject'] = subject fail2ban-0.11.1/config/action.d/smtp.py:154: msg['From'] = formataddr((self.fromname, self.fromaddr)) fail2ban-0.11.1/config/action.d/smtp.py-155- msg['To'] = self.toaddr ############################################## fail2ban-0.11.1/config/filter.d/ignorecommands/apache-fakegooglebot-15- fail2ban-0.11.1/config/filter.d/ignorecommands/apache-fakegooglebot:16: if not IPAddr(ip).isValid: fail2ban-0.11.1/config/filter.d/ignorecommands/apache-fakegooglebot-17- raise ValueError("Argument must be a single valid IP. Got: %s\n" ############################################## fail2ban-0.11.1/fail2ban/server/asyncserver.py-253- self.create_socket(socket.AF_UNIX, socket.SOCK_STREAM) fail2ban-0.11.1/fail2ban/server/asyncserver.py:254: self.set_reuse_addr() fail2ban-0.11.1/fail2ban/server/asyncserver.py-255- try: ############################################## fail2ban-0.11.1/fail2ban/server/failregex.py-429- fail = self.getGroups() fail2ban-0.11.1/fail2ban/server/failregex.py:430: return IPAddr(self.getFailID(("ip4", "ip6")), int(fail.get("cidr") or IPAddr.CIDR_UNSPEC)) ############################################## fail2ban-0.11.1/fail2ban/server/filter.py-445- if not isinstance(ip, IPAddr): fail2ban-0.11.1/fail2ban/server/filter.py:446: ip = IPAddr(ip) fail2ban-0.11.1/fail2ban/server/filter.py-447- matches = list(matches) # tuple to list ############################################## fail2ban-0.11.1/fail2ban/server/filter.py-484- # Create IP address object fail2ban-0.11.1/fail2ban/server/filter.py:485: ip = IPAddr(ipstr) fail2ban-0.11.1/fail2ban/server/filter.py-486- # Avoid exact duplicates ############################################## fail2ban-0.11.1/fail2ban/server/filter.py-523- elif not isinstance(ip, IPAddr): fail2ban-0.11.1/fail2ban/server/filter.py:524: ip = IPAddr(ip) fail2ban-0.11.1/fail2ban/server/filter.py-525- return self._inIgnoreIPList(ip, ticket, log_ignore) ############################################## fail2ban-0.11.1/fail2ban/server/filter.py-899- elif raw: fail2ban-0.11.1/fail2ban/server/filter.py:900: ip = IPAddr(host, cidr) fail2ban-0.11.1/fail2ban/server/filter.py-901- # check host equal failure-id, if not - failure with complex id: fail2ban-0.11.1/fail2ban/server/filter.py-902- if fid is not None and fid != host: fail2ban-0.11.1/fail2ban/server/filter.py:903: ip = IPAddr(fid, IPAddr.CIDR_RAW) fail2ban-0.11.1/fail2ban/server/filter.py-904- ips = [ip] ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-42- return ip fail2ban-0.11.1/fail2ban/server/ipdns.py:43: return IPAddr(ip) fail2ban-0.11.1/fail2ban/server/ipdns.py-44- ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-101- # (some python-versions resp. host configurations causes returning of integer there): fail2ban-0.11.1/fail2ban/server/ipdns.py:102: ip = IPAddr(str(result[4][0]), ipfam) fail2ban-0.11.1/fail2ban/server/ipdns.py-103- if ip.isValid: ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-120- try: fail2ban-0.11.1/fail2ban/server/ipdns.py:121: v = socket.gethostbyaddr(ip)[0] fail2ban-0.11.1/fail2ban/server/ipdns.py-122- except socket.error as e: ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-135- if plainIP is not None: fail2ban-0.11.1/fail2ban/server/ipdns.py:136: ip = IPAddr(plainIP) fail2ban-0.11.1/fail2ban/server/ipdns.py-137- if ip.isValid: ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-215-# fail2ban-0.11.1/fail2ban/server/ipdns.py:216:class IPAddr(object): fail2ban-0.11.1/fail2ban/server/ipdns.py-217- """Encapsulate functionality for IPv4 and IPv6 addresses ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-350- @property fail2ban-0.11.1/fail2ban/server/ipdns.py:351: def addr(self): fail2ban-0.11.1/fail2ban/server/ipdns.py-352- return self._addr ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-386- if other is None: return False fail2ban-0.11.1/fail2ban/server/ipdns.py:387: other = IPAddr(other) fail2ban-0.11.1/fail2ban/server/ipdns.py-388- if self._family != other._family: return False ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-403- if other is None: return False fail2ban-0.11.1/fail2ban/server/ipdns.py:404: other = IPAddr(other) fail2ban-0.11.1/fail2ban/server/ipdns.py-405- return self._family < other._family or self._addr < other._addr ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-408- if not isinstance(other, IPAddr): fail2ban-0.11.1/fail2ban/server/ipdns.py:409: other = IPAddr(other) fail2ban-0.11.1/fail2ban/server/ipdns.py-410- return "%s%s" % (self, other) ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-413- if not isinstance(other, IPAddr): fail2ban-0.11.1/fail2ban/server/ipdns.py:414: other = IPAddr(other) fail2ban-0.11.1/fail2ban/server/ipdns.py-415- return "%s%s" % (other, self) ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-545- """ fail2ban-0.11.1/fail2ban/server/ipdns.py:546: return IPAddr(mask).maskplen fail2ban-0.11.1/fail2ban/server/ipdns.py-547- ############################################## fail2ban-0.11.1/fail2ban/server/ipdns.py-561-# An IPv4 compatible IPv6 to be reused fail2ban-0.11.1/fail2ban/server/ipdns.py:562:IPAddr.IP6_4COMPAT = IPAddr("::ffff:0:0", 96) ############################################## fail2ban-0.11.1/fail2ban/server/ticket.py-92- if isinstance(value, basestring): fail2ban-0.11.1/fail2ban/server/ticket.py:93: value = IPAddr(value) fail2ban-0.11.1/fail2ban/server/ticket.py-94- self._ip = value ############################################## fail2ban-0.11.1/fail2ban/tests/action_d/test_badips.py-147- aInfo = CallingMap({ fail2ban-0.11.1/fail2ban/tests/action_d/test_badips.py:148: 'ip': IPAddr('192.0.2.1') fail2ban-0.11.1/fail2ban/tests/action_d/test_badips.py-149- }) ############################################## fail2ban-0.11.1/fail2ban/tests/actiontestcase.py-438- 'f2bV_B': 'I"m very bad hacker', fail2ban-0.11.1/fail2ban/tests/actiontestcase.py:439: 'f2bV_C': '`Very | very\n$(bad & worst hacker)`' fail2ban-0.11.1/fail2ban/tests/actiontestcase.py-440- })) ############################################## fail2ban-0.11.1/fail2ban/tests/actiontestcase.py-443- ' -- I"m very bad hacker --', fail2ban-0.11.1/fail2ban/tests/actiontestcase.py:444: ' -- `Very | very $(bad & worst hacker)` --', all=True) fail2ban-0.11.1/fail2ban/tests/actiontestcase.py-445- ############################################## fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py-88- ("Banned IP list", [ fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py:89: IPAddr("192.168.0.1"), fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py:90: IPAddr("::ffff:10.2.2.1"), fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py:91: IPAddr("2001:db8::1") fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py-92- ] ############################################## fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py-199- response = [ fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py:200: IPAddr("127.0.0.0", 8), fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py:201: IPAddr("::1"), fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py:202: IPAddr("2001:db8::", 32), fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py:203: IPAddr("::ffff:10.0.2.1") fail2ban-0.11.1/fail2ban/tests/clientbeautifiertestcase.py-204- ] ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1819- for i in s: fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1820: IPAddr('192.0.2.'+str(i), IPAddr.FAM_IPv4) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1821: IPAddr('2001:db8::'+str(i), IPAddr.FAM_IPv6) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1822- result.append(None) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1847- fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1848: def test_IPAddr(self): fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1849: ip4 = IPAddr('192.0.2.1') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1850: ip6 = IPAddr('2001:DB8::') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1851- self.assertTrue(ip4.isIPv4) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1857- # raw string: fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1858: r = IPAddr('xxx', IPAddr.CIDR_RAW) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1859- self.assertFalse(r.isIPv4) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1863- self.assertEqual('xxx', str(r)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1864: self.assertNotEqual(r, IPAddr('xxx')) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1865- # raw (not IP, for example host:port as string): fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1866: r = IPAddr('1:2', IPAddr.CIDR_RAW) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1867- self.assertFalse(r.isIPv4) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1871- self.assertEqual('1:2', str(r)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1872: self.assertNotEqual(r, IPAddr('1:2')) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1873- # raw vs ip4 (raw is not an ip): fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1874: r = IPAddr('93.184.0.1', IPAddr.CIDR_RAW) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1875: ip4 = IPAddr('93.184.0.1') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1876- self.assertNotEqual(ip4, r) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1880- # raw vs ip6 (raw is not an ip): fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1881: r = IPAddr('1::2', IPAddr.CIDR_RAW) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1882: ip6 = IPAddr('1::2') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1883- self.assertNotEqual(ip6, r) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1927- # same as above, but with IPAddr: fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1928: res = DNSUtils.ipToName(IPAddr('8.8.4.4')) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1929- self.assertTrue(res.endswith(('.google', '.google.com'))) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1937- def testAddr2bin(self): fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1938: res = IPAddr('10.0.0.0') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1939- self.assertEqual(res.addr, 167772160L) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1940: res = IPAddr('10.0.0.0', cidr=None) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1941- self.assertEqual(res.addr, 167772160L) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1942: res = IPAddr('10.0.0.0', cidr=32L) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1943- self.assertEqual(res.addr, 167772160L) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1944: res = IPAddr('10.0.0.1', cidr=32L) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1945- self.assertEqual(res.addr, 167772161L) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1946: res = IPAddr('10.0.0.1', cidr=31L) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1947- self.assertEqual(res.addr, 167772160L) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1948- fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1949: self.assertEqual(IPAddr('10.0.0.0').hexdump, '0a000000') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1950: self.assertEqual(IPAddr('1::2').hexdump, '00010000000000000000000000000002') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1951: self.assertEqual(IPAddr('xxx').hexdump, '') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1952- fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1953: self.assertEqual(IPAddr('192.0.2.0').getPTR(), '0.2.0.192.in-addr.arpa.') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1954: self.assertEqual(IPAddr('192.0.2.1').getPTR(), '1.2.0.192.in-addr.arpa.') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1955: self.assertEqual(IPAddr('2606:2800:220:1:248:1893:25c8:1946').getPTR(), fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1956- '6.4.9.1.8.c.5.2.3.9.8.1.8.4.2.0.1.0.0.0.0.2.2.0.0.0.8.2.6.0.6.2.ip6.arpa.') ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1959- self.assertEqual( fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1960: IPAddr('2606:2800:220:1:248:1893::'), fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1961: IPAddr('2606:2800:220:1:248:1893:0:0') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1962- ) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1964- self.assertEqual( fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1965: IPAddr('[2606:2800:220:1:248:1893::]'), fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1966: IPAddr('2606:2800:220:1:248:1893:0:0') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1967- ) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1969- def testIPAddr_InInet(self): fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1970: ip4net = IPAddr('93.184.0.1/24') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1971: ip6net = IPAddr('2606:2800:220:1:248:1893:25c8:0/120') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1972- # ip4: fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1973: self.assertTrue(IPAddr('93.184.0.1').isInNet(ip4net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1974: self.assertTrue(IPAddr('93.184.0.255').isInNet(ip4net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1975: self.assertFalse(IPAddr('93.184.1.0').isInNet(ip4net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1976: self.assertFalse(IPAddr('93.184.0.1').isInNet(ip6net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1977- # ip6: fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1978: self.assertTrue(IPAddr('2606:2800:220:1:248:1893:25c8:1').isInNet(ip6net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1979: self.assertTrue(IPAddr('2606:2800:220:1:248:1893:25c8:ff').isInNet(ip6net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1980: self.assertFalse(IPAddr('2606:2800:220:1:248:1893:25c8:100').isInNet(ip6net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1981: self.assertFalse(IPAddr('2606:2800:220:1:248:1893:25c8:100').isInNet(ip4net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1982- # raw not in net: fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1983: self.assertFalse(IPAddr('93.184.0.1', IPAddr.CIDR_RAW).isInNet(ip4net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1984: self.assertFalse(IPAddr('2606:2800:220:1:248:1893:25c8:1', IPAddr.CIDR_RAW).isInNet(ip6net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1985- # invalid not in net: fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1986: self.assertFalse(IPAddr('xxx').isInNet(ip4net)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1987- ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1989- ip4 = [ fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1990: IPAddr('93.184.0.1'), fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1991: IPAddr('93.184.216.1'), fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1992: IPAddr('93.184.216.34') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1993- ] fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1994- ip6 = [ fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1995: IPAddr('2606:2800:220:1:248:1893::'), fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1996: IPAddr('2606:2800:220:1:248:1893:25c8:0'), fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:1997: IPAddr('2606:2800:220:1:248:1893:25c8:1946') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-1998- ] ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2022- } fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2023: d2 = dict([(IPAddr(k), v) for k, v in d.iteritems()]) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2024- self.assertTrue(isinstance(d.keys()[0], basestring)) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2033- def testIPAddr_CIDR(self): fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2034: self.assertEqual(str(IPAddr('93.184.0.1', 24)), '93.184.0.0/24') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2035: self.assertEqual(str(IPAddr('192.168.1.0/255.255.255.128')), '192.168.1.0/25') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2036: self.assertEqual(IPAddr('93.184.0.1', 24).ntoa, '93.184.0.0/24') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2037: self.assertEqual(IPAddr('192.168.1.0/255.255.255.128').ntoa, '192.168.1.0/25') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2038- fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2039: self.assertEqual(IPAddr('93.184.0.1/32').ntoa, '93.184.0.1') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2040: self.assertEqual(IPAddr('93.184.0.1/255.255.255.255').ntoa, '93.184.0.1') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2041- fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2042: self.assertEqual(str(IPAddr('2606:2800:220:1:248:1893:25c8::', 120)), '2606:2800:220:1:248:1893:25c8:0/120') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2043: self.assertEqual(IPAddr('2606:2800:220:1:248:1893:25c8::', 120).ntoa, '2606:2800:220:1:248:1893:25c8:0/120') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2044: self.assertEqual(str(IPAddr('2606:2800:220:1:248:1893:25c8:0/120')), '2606:2800:220:1:248:1893:25c8:0/120') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2045: self.assertEqual(IPAddr('2606:2800:220:1:248:1893:25c8:0/120').ntoa, '2606:2800:220:1:248:1893:25c8:0/120') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2046- fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2047: self.assertEqual(str(IPAddr('2606:28ff:220:1:248:1893:25c8::', 25)), '2606:2880::/25') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2048: self.assertEqual(str(IPAddr('2606:28ff:220:1:248:1893:25c8::/ffff:ff80::')), '2606:2880::/25') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2049: self.assertEqual(str(IPAddr('2606:28ff:220:1:248:1893:25c8::/ffff:ffff:ffff:ffff:ffff:ffff:ffff::')), fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2050- '2606:28ff:220:1:248:1893:25c8:0/112') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2051- fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2052: self.assertEqual(str(IPAddr('2606:28ff:220:1:248:1893:25c8::/128')), fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2053- '2606:28ff:220:1:248:1893:25c8:0') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2054: self.assertEqual(str(IPAddr('2606:28ff:220:1:248:1893:25c8::/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff')), fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2055- '2606:28ff:220:1:248:1893:25c8:0') ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2062- self.assertEqual(["127.0.0.0/8", "::/32", "2001:db8::/32"], fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2063: [IPAddr("127.0.0.0", 8), IPAddr("::1", 32), IPAddr("2001:db8::", 32)] fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2064- ) ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2066- def testIPAddr_CompareDNS(self): fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2067: ips = IPAddr('example.com') fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2068: self.assertTrue(IPAddr("93.184.216.34").isInNet(ips)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2069: self.assertTrue(IPAddr("2606:2800:220:1:248:1893:25c8:1946").isInNet(ips)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2070- ############################################## fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2079- self.assertEqual(id(ip1), id(ip2)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2080: ip1 = IPAddr('93.184.216.34'); ip2 = IPAddr('93.184.216.34'); self.assertEqual(id(ip1), id(ip2)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py:2081: ip1 = IPAddr('2606:2800:220:1:248:1893:25c8:1946'); ip2 = IPAddr('2606:2800:220:1:248:1893:25c8:1946'); self.assertEqual(id(ip1), id(ip2)) fail2ban-0.11.1/fail2ban/tests/filtertestcase.py-2082- ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1110- self.assertEqual(fr.getFailID(), 'test login name') fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1111: # Success case: subnet with IPAddr (IP and subnet) conversion: fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1112- fr = FailRegex(r'%%net=<SUBNET>') ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1358- # iterator over protocol is same for both families: fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1359: r"`for proto in $(echo 'tcp,udp,sctp' | sed 's/,/ /g'); do`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1360- r"`done`", ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1363- r"`nft add set inet f2b-table addr-set-j-w-nft-mp \{ type ipv4_addr\; \}`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1364: r"`nft add rule inet f2b-table f2b-chain $proto dport \{ http,https \} ip saddr @addr-set-j-w-nft-mp reject`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1365- ), ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1367- r"`nft add set inet f2b-table addr6-set-j-w-nft-mp \{ type ipv6_addr\; \}`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1368: r"`nft add rule inet f2b-table f2b-chain $proto dport \{ http,https \} ip6 saddr @addr6-set-j-w-nft-mp reject`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1369- ), ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1374- 'stop': ( fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1375: "`{ nft -a list chain inet f2b-table f2b-chain | grep -oP '@addr-set-j-w-nft-mp\s+.*\s+\Khandle\s+(\d+)$'; } | while read -r hdl; do`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1376: "`nft delete rule inet f2b-table f2b-chain $hdl; done`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1377- "`nft delete set inet f2b-table addr-set-j-w-nft-mp`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1378: "`{ nft -a list chain inet f2b-table f2b-chain | grep -oP '@addr6-set-j-w-nft-mp\s+.*\s+\Khandle\s+(\d+)$'; } | while read -r hdl; do`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1379: "`nft delete rule inet f2b-table f2b-chain $hdl; done`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1380- "`nft delete set inet f2b-table addr6-set-j-w-nft-mp`", ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1420- 'stop': ( fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1421: "`{ nft -a list chain inet f2b-table f2b-chain | grep -oP '@addr-set-j-w-nft-ap\s+.*\s+\Khandle\s+(\d+)$'; } | while read -r hdl; do`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1422: "`nft delete rule inet f2b-table f2b-chain $hdl; done`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1423- "`nft delete set inet f2b-table addr-set-j-w-nft-ap`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1424: "`{ nft -a list chain inet f2b-table f2b-chain | grep -oP '@addr6-set-j-w-nft-ap\s+.*\s+\Khandle\s+(\d+)$'; } | while read -r hdl; do`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1425: "`nft delete rule inet f2b-table f2b-chain $hdl; done`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1426- "`nft delete set inet f2b-table addr6-set-j-w-nft-ap`", ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1478- 'ip4-unban': ( fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1479: r'''`IP=$(echo "192.0.2.1" | sed 's/[][\.]/\\\0/g') && sed -i "/^ALL: $IP$/d" /tmp/fail2ban.dummy`''', fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1480- ), ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1484- 'ip6-unban': ( fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1485: r'''`IP=$(echo "[2001:db8::]" | sed 's/[][\.]/\\\0/g') && sed -i "/^ALL: $IP$/d" /tmp/fail2ban.dummy`''', fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1486- ), ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1775- 'port="<port>"', fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1776: '`echo "block quick proto tcp from <f2b-j-w-pf> to any port $port" | pfctl -a f2b/j-w-pf -f-`', fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1777- ), ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1798- 'port="http,https"', fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1799: '`echo "block quick proto tcp from <f2b-j-w-pf-mp> to any port $port" | pfctl -a f2b/j-w-pf-mp -f-`', fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1800- ), ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1860- 'ip4-check': ( fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1861: r"`firewall-cmd --direct --get-chains ipv4 filter | sed -e 's, ,\n,g' | grep -q '^f2b-j-w-fwcmd-mp$'`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1862- ), fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1863- 'ip6-check': ( fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1864: r"`firewall-cmd --direct --get-chains ipv6 filter | sed -e 's, ,\n,g' | grep -q '^f2b-j-w-fwcmd-mp$'`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1865- ), ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1900- 'ip4-check': ( fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1901: r"`firewall-cmd --direct --get-chains ipv4 filter | sed -e 's, ,\n,g' | grep -q '^f2b-j-w-fwcmd-ap$'`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1902- ), fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1903- 'ip6-check': ( fail2ban-0.11.1/fail2ban/tests/servertestcase.py:1904: r"`firewall-cmd --direct --get-chains ipv6 filter | sed -e 's, ,\n,g' | grep -q '^f2b-j-w-fwcmd-ap$'`", fail2ban-0.11.1/fail2ban/tests/servertestcase.py-1905- ), ############################################## fail2ban-0.11.1/fail2ban/tests/servertestcase.py-2194- fail2ban-0.11.1/fail2ban/tests/servertestcase.py:2195: ipv4 = IPAddr('87.142.124.10') fail2ban-0.11.1/fail2ban/tests/servertestcase.py:2196: ipv6 = IPAddr('2001:db8::1'); fail2ban-0.11.1/fail2ban/tests/servertestcase.py-2197- dmyjail = DummyJail() ############################################## fail2ban-0.11.1/fail2ban/tests/fail2banclienttestcase.py-1255- fail2ban-0.11.1/fail2ban/tests/fail2banclienttestcase.py:1256: # Coverage for pickle of IPAddr (as string): fail2ban-0.11.1/fail2ban/tests/fail2banclienttestcase.py-1257- self.pruneLog("[test-phase end-3]") ############################################## fail2ban-0.11.1/files/cacti/fail2ban_stats.sh-33-if [ -z $JAIL ]; then fail2ban-0.11.1/files/cacti/fail2ban_stats.sh:34: echo "Usage:" `basename $0` "<jail>" fail2ban-0.11.1/files/cacti/fail2ban_stats.sh-35- exit ############################################## fail2ban-0.11.1/files/nagios/check_fail2ban-172-### Test the connection to the fail2ban server fail2ban-0.11.1/files/nagios/check_fail2ban:173:my @command_output = `$fail2ban_cmd ping`; fail2ban-0.11.1/files/nagios/check_fail2ban-174-my $return_code = $?; ############################################## fail2ban-0.11.1/files/nagios/check_fail2ban-312- fail2ban-0.11.1/files/nagios/check_fail2ban:313: my @command_output = `$fail2ban_client_path status`; fail2ban-0.11.1/files/nagios/check_fail2ban-314- my $return_code = $?; ############################################## fail2ban-0.11.1/files/nagios/check_fail2ban-334- fail2ban-0.11.1/files/nagios/check_fail2ban:335: my @command_output = `$fail2ban_client_path status $jail_name`; fail2ban-0.11.1/files/nagios/check_fail2ban-336- my $return_code = $?; ############################################## fail2ban-0.11.1/kill-server-1-#!/bin/bash fail2ban-0.11.1/kill-server:2:kill `ps ax|grep fail2ban|grep -v grep|awk '{print $1}'` ############################################## fail2ban-0.11.1/.pc/0002-ENH-verify-that-use_stock_cfg-was-not-provided-while.patch/fail2ban/tests/fail2banclienttestcase.py-1253- fail2ban-0.11.1/.pc/0002-ENH-verify-that-use_stock_cfg-was-not-provided-while.patch/fail2ban/tests/fail2banclienttestcase.py:1254: # Coverage for pickle of IPAddr (as string): fail2ban-0.11.1/.pc/0002-ENH-verify-that-use_stock_cfg-was-not-provided-while.patch/fail2ban/tests/fail2banclienttestcase.py-1255- self.pruneLog("[test-phase end-3]")