
    h                         S r SSKrSSKJr  SSKJr  SSKJr  SSKJ	r	J
r
  SSKJr  SrS	r\" \\R                  5       " S
 S5      5       r\" 5       rg)z;
Cred plugin for a file of the format 'username:password'.
    N)implementer)plugin)FilePasswordDB)IUsernameHashedPasswordIUsernamePassword)ICheckerFactoryz
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.
zWarning: not a valid filec                   J    \ rS rSrSrSr\rSr\	\
4r\R                  rS rSrg)FileCheckerFactory   z/
A factory for instances of L{FilePasswordDB}.
filez,Location of a FilePasswordDB-formatted file.c                     SSK Jn  UR                  5       (       d  [        SU R                  -  5      eU" U5      R                  5       (       d%  U R                  R                  [         SU S35        [        U5      $ )z
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).
r   )FilePathz%r requires a filenamez: 
)
twisted.python.filepathr   strip
ValueErrorauthTypeisfileerrorOutputwriteinvalidFileWarningr   )self	argstringr   s      `/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/twisted/plugins/cred_file.pygenerateChecker"FileCheckerFactory.generateChecker+   sk     	5  5EFF)$++--""&8%9I;b#IJi((     N)__name__
__module____qualname____firstlineno____doc__r   fileCheckerFactoryHelpauthHelpargStringFormatr   r   credentialInterfacessysstderrr   r   __static_attributes__r   r   r   r
   r
      s2     H%HDO-/FG**K)r   r
   )r#   r(   zope.interfacer   twistedr   twisted.cred.checkersr   twisted.cred.credentialsr   r   twisted.cred.strcredr   r$   r   IPluginr
   theFileCheckerFactoryr   r   r   <module>r2      s]   
  &  0 O 0  1  _fnn-) ) .): +, r   