baseshell.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:covertutils 作者: operatorequals 项目源码 文件源码
def __init__( self, handler, **kw ) :

        cmd.Cmd.__init__(self)
        arguments = defaultArgMerging(BaseShell.Defaults, kw)
        self.prompt_templ = arguments['prompt']
        self.ignore_messages = arguments['ignore_messages']
        self.output = arguments['output']
        self.debug = arguments['debug']
        subshells = arguments['subshells']

        self.subshells_dict = {}
        self.handler = handler
        for stream_name, subshell_attrs in subshells.items() :
            if type(subshell_attrs) is tuple :
                subshell_class, subshell_kwargs = subshell_attrs
            else :
                subshell_class, subshell_kwargs = (subshell_attrs, dict())

            self.addSubShell( stream_name, subshell_class, subshell_kwargs )

        handler.onChunk = handlerCallbackHook( handler.onChunk, self.subshells_dict )
        self.updatePrompt()
        self.sysinfo = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号