base.py 文件源码

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

项目:shellgen 作者: MarioVilas 项目源码 文件源码
def __init__(self, *children):

        # Populate the list of children.
        self._children = []
        parent = weakref.ref(self)
        previous = self
        for child in children:
            if isinstance(child, str):    # bytes
                child = Raw(child, self.arch, self.os)
            elif not isinstance(child, Shellcode):
                raise TypeError(
                    "Expected Shellcode, got %s instead" % type(child))
            elif child.parent:
                msg = "Already had a parent: %r" % child.parent
                warnings.warn(msg, ShellcodeWarning)
            child._parent = parent
            self._children.append(child)
            previous._check_platform(child)
            previous = child

    # Dark magic to implement the metadata combination feature.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号