Skip to content

Instantly share code, notes, and snippets.

bmaiyo briankip

  • Kenya
Block or report user

Report or block briankip

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@briankip
briankip / binwalk.md
Last active Oct 5, 2019
A short introduction to binwalk
View binwalk.md

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

@briankip
briankip / phpunit-assertions.md
Last active Mar 14, 2019
A list of PHPUnit assertions
View phpunit-assertions.md
  • assertArrayHasKey
  • assertArrayNotHasKey
  • assertContains
  • assertAttributeContains
  • assertNotContains
  • assertAttributeNotContains
  • assertContainsOnly
  • assertAttributeContainsOnly
  • assertNotContainsOnly
  • assertAttributeNotContainsOnly
@briankip
briankip / Pluralizer.php
Last active Jul 4, 2017
from Illuminate\Support
View Pluralizer.php
<?php
use Doctrine\Common\Inflector\Inflector;
class Pluralizer
{
/**
* Uncountable word forms.
*
* @var array
View blisinterface.ini
;************************** 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
;
View ssss
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';
View myftpd.c
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<arpa/inet.h>
#include<unistd.h>
#define QUEUE 1 //Queue for incoming connections
#define BUFFLENGTH 512 //Send buffer length
View myftpc.c
#include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#include <netdb.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
@briankip
briankip / py.py
Created May 7, 2015
python script for reading from windows serial
View py.py
#/usr/bin/env python
import serial
#variables
port='COM2';
baudrate='9600';
bytesize=serial.EIGHTBITS; #EIGHT BITS
parity=serial.PARITY_NONE; # ODD
stopbits=serial.STOPBITS_ONE; # 2 STOP BITS
@briankip
briankip / SudokuSolve.cpp
Created May 4, 2015
PM Lee's C++ Sudoku Solver Souce Code.
View SudokuSolve.cpp
#include "stdio.h"
int InBlock[81], InRow[81], InCol[81];
const int BLANK = 0;
const int ONES = 0x3fe; // Binary 1111111110
int Entry[81]; // Records entries 1-9 in the grid, as the corresponding bit set to 1
int Block[9], Row[9], Col[9]; // Each int is a 9-bit array
@briankip
briankip / wvdial.conf
Created Apr 1, 2015
Configuration for wvdial to work with safaricom modem
View wvdial.conf
[Dialer Defaults]
Phone = *99#
Username = saf
Password = data
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/ttyUSB0
Baud = 3600000
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
You can’t perform that action at this time.