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)
评论列表
文章目录