__init__.py 文件源码

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

项目:docker-network-capture 作者: shaded-enmity 项目源码 文件源码
def _run_pcap_parser(self, rx_tcpdump, interface):
        rx, tx = pipe()
        # dupe pids for the child process
        tcpdump, out = dup(rx_tcpdump), dup(tx)
        close(tx)
        close(rx_tcpdump)
        pid = fork()
        if pid:
            close(out)
            close(tcpdump)
            self.child_parser = pid
            self.rx = rx
        else:
            # get rid of unnecessary privileges
            drop_privileges()
            # start parsing packets
            start_pcap_parser(tcpdump, out, interface)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号