base.py 文件源码

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

项目:shellgen 作者: MarioVilas 项目源码 文件源码
def _check_platform(self, other):
        """
        Verify that this and another shellcode have compatible platforms.

        This means they are for the same plaform, or at least one of them is
        platform independent.

        :type  other: `Shellcode`
        :param other: Another shellcode.

        :return: There is no return value.
            Warnings are raised if the platforms don't match.
        """
        if 'any' not in (self.arch, other.arch) and self.arch != other.arch:
            msg = "Processor architectures don't match: %s and %s"
            msg = msg % (self.arch, other.arch)
            warnings.warn(msg, ShellcodeWarning)
        if 'any' not in (self.os, other.os) and self.os != other.os:
            msg = "Operating systems don't match: %s and %s"
            msg = msg % (self.os, other.os)
            warnings.warn(msg, ShellcodeWarning)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号