Skip to content

Instantly share code, notes, and snippets.

View V3rdantWhisper's full-sized avatar

V3rdant V3rdantWhisper

  • WuHan University
  • WuHan University
  • 03:51 (UTC +08:00)
View GitHub Profile
@V3rdantWhisper
V3rdantWhisper / bin2c_auto.py
Created October 17, 2025 09:33
dump nasm shellcode to c vector with pattern "11 11...." "22 22 ...."
#!/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