util.py 文件源码

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

项目:OSPTF 作者: xSploited 项目源码 文件源码
def IIDToInterfaceName(iid):
    """Converts an IID to a string interface name.  

    Used primarily for debugging purposes, this allows a cryptic IID to
    be converted to a useful string name.  This will firstly look for interfaces
    known (ie, registered) by pythoncom.  If not known, it will look in the
    registry for a registered interface.

    iid -- An IID object.

    Result -- Always a string - either an interface name, or '<Unregistered interface>'
    """
    try:
        return pythoncom.ServerInterfaces[iid]
    except KeyError:
        try:
            try:
                return win32api.RegQueryValue(win32con.HKEY_CLASSES_ROOT, "Interface\\%s" % iid)
            except win32api.error:
                pass
        except ImportError:
            pass
        return str(iid)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号