poison_ivy_api_name_fix.py 文件源码

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

项目:Cyber-Defence 作者: nccgroup 项目源码 文件源码
def make_enums(self):
        """ 
            Create the enumerations from the files. 
            This function will read all .txt files in a given directory
            and create an enum for each file.
        """

        dir_path = idc.AskStr("", "Enter full path to the directory of dumped PoisonIvy symbols")

        if not os.path.exists(dir_path):
            idc.Warning("Invalid path. Restart script and enter a valid path")
            idc.Exit

        for item in os.listdir(dir_path):
            filename = os.path.join(dir_path, item)

            if not os.path.isfile(filename):
                continue

            if not filename.endswith('.txt'):
                continue

            with open(filename, 'rb') as fh:
                symbols = self.fixdata(fh)
                self.createenum(symbols)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号