Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Return Assign AttributeStore NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Str Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr handlers ExceptHandler type NameLoad body Return If BoolOpOr UnaryOpNot NameLoad UnaryOpNot Call NameLoad Call AttributeLoad NameLoad attr body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr BinOpAdd Call NameLoad NameLoad Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Num If UnaryOpNot CompareIn NameLoad TupleLoad Str Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad Call NameLoad SubscriptLoad NameLoad Slice Num Index Num Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad For TupleStore NameStore NameStore NameLoad body If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Num orelse If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Num orelse If CompareIn NameLoad TupleLoad Num Num body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str orelse Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Assign NameStore BinOpAdd BinOpAdd Call NameLoad Str Call NameLoad Str Call NameLoad Str AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body AugAssignAdd NameStore Call NameLoad NameLoad AugAssignAdd NameStore Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore AttributeStore NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore ListLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Slice Num Index Num Assign NameStore SubscriptLoad NameLoad Slice Num While CompareLt Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Num If NameLoad body Raise Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call NameLoad NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
This module contains ...
 N/A struct twisted.python log twisted.internet defer twisted.conch.interfaces IConchUser twisted.conch.ssh userauth twisted.conch.ssh.common NS getNS twisted.conch error cowrie.core credentials HoneyPotSSHUserAuthServer N/A N/A userauth SSHUserAuthServer N/A N/A 
    This contains modifications to the authentication system to do:
    * Login banners (like /etc/issue.net)
    * Anonymous authentication
    * Keyboard-interactive authentication (PAM)
    * IP based authentication
     serviceStarted N/A N/A self N/A N/A N/A N/A N/A N/A self interfaceToMethod N/A N/A credentials IUsername none N/A N/A N/A self interfaceToMethod N/A N/A credentials IUsernamePasswordIP password N/A N/A N/A self interfaceToMethod N/A N/A credentials IPluggableAuthenticationModulesIP keyboard-interactive N/A N/A self bannerSent False N/A N/A self _pamDeferred None N/A N/A N/A N/A userauth SSHUserAuthServer serviceStarted self N/A sendBanner N/A N/A self N/A N/A N/A 
        Display contents of <honeyfs>/etc/issue.net
         N/A N/A self bannerSent N/A N/A N/A N/A self bannerSent True N/A N/A N/A honeyfs N/A N/A N/A N/A N/A self portal realm cfg get honeypot contents_path N/A issuefile N/A honeyfs /etc/issue.net N/A data N/A N/A N/A open issuefile read N/A N/A N/A IOError N/A N/A N/A N/A N/A data N/A N/A len N/A N/A data strip N/A N/A N/A N/A N/A N/A self transport sendPacket N/A userauth MSG_USERAUTH_BANNER N/A N/A NS data N/A NS en N/A ssh_USERAUTH_REQUEST N/A N/A self packet N/A N/A N/A N/A N/A N/A self sendBanner N/A N/A N/A N/A userauth SSHUserAuthServer ssh_USERAUTH_REQUEST self packet N/A auth_publickey N/A N/A self packet N/A N/A N/A 
        We subclass to intercept non-dsa/rsa keys, or Conch will crash on ecdsa..
         N/A N/A algName blob rest N/A getNS N/A packet N/A 1 2 N/A N/A N/A algName N/A ssh-rsa ssh-dsa N/A N/A N/A N/A log msg N/A Attempted public key authentication with %s algorithm N/A algName N/A N/A N/A defer fail N/A N/A error ConchError Incorrect signature N/A N/A N/A N/A userauth SSHUserAuthServer auth_publickey self packet N/A auth_none N/A N/A self packet N/A N/A N/A 
        Allow every login
         N/A c N/A N/A credentials Username N/A self user N/A srcIp N/A N/A N/A N/A N/A self transport transport getPeer host N/A N/A N/A N/A self portal login c srcIp IConchUser N/A auth_password N/A N/A self packet N/A N/A N/A 
        Overridden to pass src_ip to credentials.UsernamePasswordIP
         N/A password N/A N/A getNS N/A packet N/A 1 N/A 0 N/A srcIp N/A N/A N/A N/A N/A self transport transport getPeer host N/A c N/A N/A credentials UsernamePasswordIP N/A self user password srcIp N/A N/A N/A N/A N/A N/A self portal login c srcIp IConchUser addErrback N/A self _ebPassword N/A auth_keyboard_interactive N/A N/A self packet N/A N/A N/A 
        Keyboard interactive authentication.  No payload.  We create a
        PluggableAuthenticationModules credential and authenticate with our
        portal.

        Overridden to pass src_ip to credentials.PluggableAuthenticationModulesIP
         N/A N/A N/A self _pamDeferred None N/A N/A N/A N/A N/A self transport sendDisconnect N/A transport DISCONNECT_PROTOCOL_ERROR only one keyboard interactive attempt at a time N/A N/A N/A defer fail N/A N/A error IgnoreAuthentication N/A src_ip N/A N/A N/A N/A N/A self transport transport getPeer host N/A c N/A N/A credentials PluggableAuthenticationModulesIP N/A self user N/A self _pamConv src_ip N/A N/A N/A N/A N/A N/A self portal login c src_ip IConchUser addErrback N/A self _ebPassword N/A _pamConv N/A N/A self items N/A N/A N/A 
        Convert a list of PAM authentication questions into a
        MSG_USERAUTH_INFO_REQUEST.  Returns a Deferred that will be called
        back when the user has responses to the questions.

        @param items: a list of 2-tuples (message, kind).  We only care about
            kinds 1 (password) and 2 (text).
        @type items: C{list}
        @rtype: L{defer.Deferred}
         N/A resp N/A N/A N/A message kind items N/A N/A N/A kind 1 N/A N/A N/A N/A resp append N/A message 0 N/A N/A N/A kind 2 N/A N/A N/A N/A resp append N/A message 1 N/A N/A N/A kind N/A 3 4 N/A N/A N/A N/A defer fail N/A N/A error ConchError cannot handle PAM 3 or 4 messages N/A N/A N/A N/A defer fail N/A N/A error ConchError N/A bad PAM auth kind %i N/A kind N/A packet N/A N/A N/A NS N/A NS N/A NS N/A packet N/A N/A struct pack >L N/A len resp N/A N/A prompt echo resp N/A N/A packet N/A NS prompt N/A packet N/A chr echo N/A N/A N/A N/A self transport sendPacket N/A userauth MSG_USERAUTH_INFO_REQUEST packet N/A N/A self _pamDeferred N/A N/A defer Deferred N/A N/A self _pamDeferred N/A ssh_USERAUTH_INFO_RESPONSE N/A N/A self packet N/A N/A N/A 
        The user has responded with answers to PAMs authentication questions.
        Parse the packet into a PAM response and callback self._pamDeferred.
        Payload::
            uint32 numer of responses
            string response 1
            ...
            string response n
         N/A N/A d N/A self _pamDeferred N/A N/A self _pamDeferred None N/A N/A N/A resp N/A N/A numResps N/A N/A N/A struct unpack >L N/A packet N/A 4 N/A 0 N/A packet N/A packet N/A 4 N/A N/A N/A len resp numResps N/A N/A N/A response packet N/A getNS packet N/A N/A N/A resp append N/A response 0 N/A packet N/A N/A N/A N/A error ConchError N/A N/A {:d} bytes of extra data format N/A len packet N/A N/A N/A N/A N/A N/A d errback N/A N/A failure Failure N/A N/A N/A N/A d callback resp N/A N/A