collect.py 文件源码

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

项目:captiv8 作者: wraith-wireless 项目源码 文件源码
def run(self):
        # we'll pull out scan & card to avoid calling it every SCAN seconds
        i = 0
        card = self._card
        scan = self._scan
        n = len(self._scan)

        # loop until the card is destroyed. we'll use pyric.error as
        # a poison pill
        nlsock = nl.nl_socket_alloc()
        while True:
            try:
                time.sleep(SCAN)
                i = (i + 1) % n
                pyw.freqset(card, scan[i][0], scan[i][1], nlsock)
            except pyric.error:
                # ideally we should check below and return error if
                # we didn't lose the card
                #if not pyw.validcard(card,nlsock): break
                break
        nl.nl_socket_free(nlsock)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号