getsploit.py 文件源码

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

项目:getsploit 作者: vulnersCom 项目源码 文件源码
def lenNg(iterable):
    """Redefining len here so it will be able to work with non-ASCII characters
    """
    if isinstance(iterable, bytes_type) or isinstance(iterable, unicode_type):
        unicode_data = obj2unicode(iterable)
        if hasattr(unicodedata, 'east_asian_width'):
            w = unicodedata.east_asian_width
            return sum([w(c) in 'WF' and 2 or 1 for c in unicode_data])
        else:
            return unicode_data.__len__()
    else:
        return iterable.__len__()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号