dockerproxy.py 文件源码

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

项目:dockerproxy 作者: mdsecresearch 项目源码 文件源码
def run_throwaway(self):
        import getpass
        username = getpass.getuser()
        #attempt to avoid cmd & arg injection
        self.DOCKER_THROWAWAYCMDARGS = self.DOCKER_THROWAWAYCMDARGS.format(username, pipes.quote(self.url))
        cmd = shlex.split("docker " + self.DOCKER_THROWAWAYCMDARGS)

        if self.DEBUG:
            logging.debug("### Invoking: " + str(cmd))

        result = Popen(cmd, shell=False, env=self.ENVIRONMENT, stdin=None, stdout=None, stderr=None, close_fds=True, preexec_fn=os.setpgrp)
        #need to give the process a little time to load before exiting :)
        time.sleep(5)
        sys.exit(0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号