This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
bin2c_auto.py - 将二进制文件转换为 C 字节数组,并自动识别按序出现的 | |
占位符:8 个或以上相同字节的段,字节值依次为 0x11, 0x22, ..., 0x99(最多9种)。 | |
用法: | |
./bin2c_auto.py -i input.bin -o out.c -n payload | |
""" | |
import argparse | |
import os |