__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# -*- test-case-name: twisted.test.test_strcred -*-
#
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Cred plugin for a file of the format 'username:password'.
"""
import sys
from zope.interface import implementer
from twisted import plugin
from twisted.cred.checkers import FilePasswordDB
from twisted.cred.credentials import IUsernameHashedPassword, IUsernamePassword
from twisted.cred.strcred import ICheckerFactory
fileCheckerFactoryHelp = """
This checker expects to receive the location of a file that
conforms to the FilePasswordDB format. Each line in the file
should be of the format 'username:password', in plain text.
"""
invalidFileWarning = "Warning: not a valid file"
@implementer(ICheckerFactory, plugin.IPlugin)
class FileCheckerFactory:
"""
A factory for instances of L{FilePasswordDB}.
"""
authType = "file"
authHelp = fileCheckerFactoryHelp
argStringFormat = "Location of a FilePasswordDB-formatted file."
# Explicitly defined here because FilePasswordDB doesn't do it for us
credentialInterfaces = (IUsernamePassword, IUsernameHashedPassword)
errorOutput = sys.stderr
def generateChecker(self, argstring):
"""
This checker factory expects to get the location of a file.
The file should conform to the format required by
L{FilePasswordDB} (using defaults for all
initialization parameters).
"""
from twisted.python.filepath import FilePath
if not argstring.strip():
raise ValueError("%r requires a filename" % self.authType)
elif not FilePath(argstring).isfile():
self.errorOutput.write(f"{invalidFileWarning}: {argstring}\n")
return FilePasswordDB(argstring)
theFileCheckerFactory = FileCheckerFactory()
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 609 B | 0644 |
|
| cred_anonymous.py | File | 958 B | 0644 |
|
| cred_file.py | File | 1.77 KB | 0644 |
|
| cred_memory.py | File | 2.23 KB | 0644 |
|
| cred_sshkeys.py | File | 1.39 KB | 0644 |
|
| cred_unix.py | File | 5.81 KB | 0644 |
|
| dropin.cache | File | 5.49 KB | 0755 |
|
| twisted_conch.py | File | 530 B | 0644 |
|
| twisted_core.py | File | 550 B | 0644 |
|
| twisted_ftp.py | File | 212 B | 0644 |
|
| twisted_inet.py | File | 262 B | 0644 |
|
| twisted_mail.py | File | 224 B | 0644 |
|
| twisted_names.py | File | 236 B | 0644 |
|
| twisted_portforward.py | File | 277 B | 0644 |
|
| twisted_reactors.py | File | 1.73 KB | 0644 |
|
| twisted_runner.py | File | 280 B | 0644 |
|
| twisted_socks.py | File | 236 B | 0644 |
|
| twisted_trial.py | File | 3.44 KB | 0644 |
|
| twisted_web.py | File | 331 B | 0644 |
|
| twisted_words.py | File | 938 B | 0644 |
|