jelly.py 文件源码

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

项目:sslstrip-hsts-openwrt 作者: adde88 项目源码 文件源码
def _unjelly_method(self, rest):
        ''' (internal) unjelly a method
        '''
        im_name = rest[0]
        im_self = self.unjelly(rest[1])
        im_class = self.unjelly(rest[2])
        if type(im_class) is not types.ClassType:
            raise InsecureJelly("Method found with non-class class.")
        if im_class.__dict__.has_key(im_name):
            if im_self is None:
                im = getattr(im_class, im_name)
            elif isinstance(im_self, NotKnown):
                im = _InstanceMethod(im_name, im_self, im_class)
            else:
                im = instancemethod(im_class.__dict__[im_name],
                                    im_self,
                                    im_class)
        else:
            raise 'instance method changed'
        return im
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号