OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
twisted
/
plugins
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/31/2022 06:22:38 AM
rwxr-xr-x
📄
__init__.py
590 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📁
__pycache__
-
03/31/2022 06:22:39 AM
rwxr-xr-x
📄
cred_anonymous.py
1017 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
cred_file.py
1.83 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
cred_memory.py
2.33 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
cred_sshkeys.py
1.46 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
cred_unix.py
3.75 KB
09/23/2017 05:51:46 AM
rw-r--r--
📄
dropin.cache
6.05 KB
03/31/2022 06:22:40 AM
rwxr-xr-x
📄
twisted_conch.py
519 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
twisted_core.py
589 bytes
09/08/2017 10:38:35 AM
rw-r--r--
📄
twisted_ftp.py
229 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
twisted_inet.py
260 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
twisted_names.py
247 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
twisted_portforward.py
275 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
twisted_reactors.py
1.84 KB
09/08/2017 10:38:35 AM
rw-r--r--
📄
twisted_runner.py
278 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
twisted_socks.py
247 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
twisted_trial.py
2.04 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
twisted_web.py
312 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
twisted_words.py
1 KB
09/08/2017 10:38:36 AM
rw-r--r--
Editing: cred_memory.py
Close
# -*- test-case-name: twisted.test.test_strcred -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Cred plugin for an in-memory user database. """ from __future__ import absolute_import, division from zope.interface import implementer from twisted import plugin from twisted.cred.strcred import ICheckerFactory from twisted.cred.checkers import InMemoryUsernamePasswordDatabaseDontUse from twisted.cred.credentials import IUsernamePassword, IUsernameHashedPassword inMemoryCheckerFactoryHelp = """ A checker that uses an in-memory user database. This is only of use in one-off test programs or examples which don't want to focus too much on how credentials are verified. You really don't want to use this for anything else. It is a toy. """ @implementer(ICheckerFactory, plugin.IPlugin) class InMemoryCheckerFactory(object): """ A factory for in-memory credentials checkers. This is only of use in one-off test programs or examples which don't want to focus too much on how credentials are verified. You really don't want to use this for anything else. It is, at best, a toy. If you need a simple credentials checker for a real application, see L{cred_file.FileCheckerFactory}. """ authType = 'memory' authHelp = inMemoryCheckerFactoryHelp argStringFormat = 'A colon-separated list (name:password:...)' credentialInterfaces = (IUsernamePassword, IUsernameHashedPassword) def generateChecker(self, argstring): """ This checker factory expects to get a list of username:password pairs, with each pair also separated by a colon. For example, the string 'alice:f:bob:g' would generate two users, one named 'alice' and one named 'bob'. """ checker = InMemoryUsernamePasswordDatabaseDontUse() if argstring: pieces = argstring.split(':') if len(pieces) % 2: from twisted.cred.strcred import InvalidAuthArgumentString raise InvalidAuthArgumentString( "argstring must be in format U:P:...") for i in range(0, len(pieces), 2): username, password = pieces[i], pieces[i+1] checker.addUser(username, password) return checker theInMemoryCheckerFactory = InMemoryCheckerFactory()