Files
Extract_code/README.md
2024-10-16 18:14:46 +08:00

40 lines
993 B
Markdown

`interface_extract.py``idapython`脚本,需要配合使用`idat`使用,相当于接口,调用使用以下语句
```
cmd=f''' {idat64_path} -A -B -S"interface_extract.py" {file} '''
```
`test.py`是调用`interface_extract.py`的脚本,使用提取的时候都是用`test.py`来提取
执行命令
```
python test.py -e idat64_path file <Extract_Functions>
python test.py -h
```
![image-20241015110234709](assets/image-20241015110234709.png)
提取结果包含`c文件(extract.c)``结构体文件(Estruct.json)`
提取结果保存在`result`文件夹下
```
提取c的文件格式为 提取二进制文件名+"_extract.c"
提取结构体文件格式为 提取二进制文件名+"_Estruct.json"
```
![image-20241016180553384](assets/image-20241016180553384.png)
```
json包含三个信息
结构体名称:"name"
结构体大小:"size"
结构体定义:"info"
```
![image-20241016180957132](assets/image-20241016180957132.png)