device_finder.py 文件源码

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

项目:win_driver_plugin 作者: mwrlabs 项目源码 文件源码
def get_unicode_device_names():
    """Returns all unicode strings within the binary currently being analysed in IDA which might be device names"""

    path = idc.GetInputFile()
    min_length = 4
    possible_names = set()
    with open(path, "rb") as f:
        b = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)

        for s in extract_unicode_strings(b, n=min_length):
            s_str = str(s.s)
            if s_str.startswith('\\Device\\') or s_str.startswith('\\DosDevices\\'):
                possible_names.add(str(s.s))
    return possible_names
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号