execute.py 文件源码

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

项目:0ops.exed 作者: whisperaven 项目源码 文件源码
def GET(self, **params):
        """ Execute command on remote host. """
        target = parse_params_target(params)
        cmd = params.pop('cmd', None)
        if cmd == None:
            raise cherrypy.HTTPError(status.BAD_REQUEST, ERR_BAD_SERVPARAMS)
        cmd = unquote(cmd)

        result = self.handle(target, cmd)
        if not result:
            raise cherrypy.HTTPError(status.NOT_FOUND, ERR_NO_MATCH)
        else:
            return response(status.OK, result)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号