Skip to content

buzzer-re/BlobToChar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlobToChar

C/C++ CI

What is this ?

BlobToChar its an C++ program that allows you to load an binary file in C arrays format, this is good if you want to embed files inside your source code.

Examples

Dumping in stdout

$ ./BlobToChar --blobname simple_dump
char arr[] = {0x7,0xbc,0xef,0xce,0x90,0x90,};

Dumping inside an source code

actual code

#include <stdio.h>



int main()
{
    return 0;
}

Run BlobToChar

$ ./BlobToChar --blobname simple_dump --filename source.c --linenumber 4 --varname buff
New variable buff inserted with success in line 3 of the file source.c

Modified code

#include <stdio.h>


char buff[] = {0x7,0xbc,0xef,0xce,0x90,0x90,};

int main()
{
    return 0;
}

Usage

You can use this tool for:

  • Load files inside your code
  • Load shellcode inside your source quickly
  • Load anything that you want be in C arrays format!

Example

asciicast

Options

$ ./BlobToChar
Usage: ./BlobToChar [options]

--blobname      Name of the binary file
--filename      Name of the target source
--linenumber    Number to insert
--varname       variable name inside code

Install

You will need cmake in order to compile & install this tool.

mkdir build
cd build
cmake .. && make && sudo make install

Thanks