SkillAgentSearch skills...

File2header

Convert any binary to a C-style array

Install / Use

/learn @patrickcjk/File2header
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

file2header

Convert any binary to a C-style array (generating an header file)

Usage

$ file2header <input_binary.exe> <output_header.h> <bytes_per_line>
<input_binary.exe>    Path to any binary file
<output_header.h>     Path to output file
<bytes_per_line>      Optionnal: Number of bytes for each line (default: 25)
Example: file2header image.exe image.h 30

Output example

#pragma once
#include <cstdint>

const uint8_t image[] = 
{
    0x4D, 0x5A, 0x90, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 
    0xFF, 0xFF, 0x00, 0x00, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 //...
};
View on GitHub
GitHub Stars24
CategoryDevelopment
Updated1mo ago
Forks8

Languages

C++

Security Score

75/100

Audited on Mar 1, 2026

No findings