Skip to content

Instantly share code, notes, and snippets.

int main()
{
char *str = "blablabla";
char c = 'H';
size_t len = strlen(str);
char *str2 = malloc(len + 1 + 1 ); /* one for extra char, one for trailing zero */
strcpy(str2, str);
str2[len] = c;
str2[len + 1] = '\0';
@briankip
briankip / binwalk.md
Last active March 2, 2024 13:25
A short introduction to binwalk

Binwalk

Binwalk is a simple linux tool for analysing binary files for embeded files and executable code. It is mostly used to extract the content of firmware images.

Installation

On kali linux, binwalk is already installed. On ubuntu you can do apt-get install binwalk or you can go to https://github.com/devttys0/binwalk and follow the instructions.

Usage

;************************** BLIS INTERFACE CLIENT CONFIGURATION FILE **********************************************
;This is the main configuration file for C4G BLIS Interface Client.
;BLIS Interface Client is a very lightweight client for Interfacing BLIS with external systems using Protocols like
;RS232 Serial Port,TCP/IP, HTTP
;
;
; C4G BLIS Equipment Interface Client
;
; Project funded by PEPFAR
;
@briankip
briankip / Pluralizer.php
Last active July 4, 2017 13:26
from Illuminate\Support
<?php
use Doctrine\Common\Inflector\Inflector;
class Pluralizer
{
/**
* Uncountable word forms.
*
* @var array