transport.py 文件源码

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

项目:watchmen 作者: lycclsltt 项目源码 文件源码
def send_ignore(self, bytes=None):
        """
        Send a junk packet across the encrypted link.  This is sometimes used
        to add "noise" to a connection to confuse would-be attackers.  It can
        also be used as a keep-alive for long lived connections traversing
        firewalls.

        @param bytes: the number of random bytes to send in the payload of the
            ignored packet -- defaults to a random number from 10 to 41.
        @type bytes: int
        """
        m = Message()
        m.add_byte(chr(MSG_IGNORE))
        if bytes is None:
            bytes = (ord(rng.read(1)) % 32) + 10
        m.add_bytes(rng.read(bytes))
        self._send_user_message(m)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号