Skip to content

Instantly share code, notes, and snippets.

View obonyojimmy's full-sized avatar
💻
probably coding

jimmycliff obonyo obonyojimmy

💻
probably coding
View GitHub Profile
@obonyojimmy
obonyojimmy / AndroidTrinity.md
Created January 11, 2017 00:40 — forked from pdxjohnny/AndroidTrinity.md
Trinity on Android for Intel

Trinity fuzzer on Android (on Intel)

Step 1 - Clone trinity

Grab the source for trinity. We need to make some minor modifications.

At the time of writing this the latest commit on master was 3a0e33d1db3214503316840ecfb90075d60ab3be adapt instructions as necessary. The basic idea of static linking and disabling of feature's you don't need is still the same.

package main
import (
"net"
"log"
"bufio"
"os"
"fmt"
)
@obonyojimmy
obonyojimmy / StreamToString.go
Created January 14, 2017 03:47 — forked from tejainece/StreamToString.go
Golang: io.Reader stream to string or byte slice
import "bytes"
func StreamToByte(stream io.Reader) []byte {
buf := new(bytes.Buffer)
buf.ReadFrom(stream)
return buf.Bytes()
}
func StreamToString(stream io.Reader) string {
buf := new(bytes.Buffer)
@obonyojimmy
obonyojimmy / aescmd.go
Created January 15, 2017 03:57 — forked from josephspurrier/aescmd.go
Golang - Encrypt, Decrypt, File Read, File Write, Readline
package main
import (
"bufio"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"fmt"
"io"
"io/ioutil"
@obonyojimmy
obonyojimmy / pcap.go
Created February 3, 2017 00:58 — forked from landonf/pcap.go
Go C ffi example
/*
* Copyright (c) 2013 Landon Fuller <landonf@mac68k.info>
* All rights reserved.
*/
/* Interface to the native pcap(3) library */
package pcap
/*
#cgo LDFLAGS: -lpcap
package main
import (
"log"
"syscall"
)
func htonsInt16(n int) int {
return int(int16(byte(n))<<8 | int16(byte(n>>8)))
}
@obonyojimmy
obonyojimmy / fetch.go
Created February 8, 2017 01:08 — forked from jtwaleson/fetch.go
Certificate fetcher in Go
package main
import "crypto/tls"
import "crypto/sha1"
import "crypto/x509"
import "fmt"
import "encoding/pem"
import "os"
import "time"
import "bufio"
@obonyojimmy
obonyojimmy / _spacing-helpers.scss
Created June 24, 2017 02:04 — forked from jacurtis/_spacing-helpers.scss
SASS Margin and Padding Helpers Loop. Generates .m-t-10 type helper classes.
/*
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
@obonyojimmy
obonyojimmy / gist:4c1c4ac84c510d1aa2e75c9b8c529cd8
Created July 11, 2017 21:14 — forked from harrisonde/gist:90431ed357cc93e12b51
Deploy Laravel 5 applications on AWS Elastic Beanstalk
# The following script will deploy a Laravel 5 applicaion on AWS Elastic Beanstalk.
# Add to .ebextensions at the root of your application and name your commands file (e.g., commands.config)
# -------------------------------- Commands ------------------------------------
# Use "commands" key to execute commands on the EC2 instance. The commands are
# processed in alphabetical order by name, and they run before the application
# and web server are set up and the application version file is extracted.
# ------------------------------------------------------------------------------
commands:
01updateComposer:
@obonyojimmy
obonyojimmy / phpmyadmin.config
Created July 12, 2017 18:39 — forked from Azrael808/phpmyadmin.config
Install and Configure PHPMyAdmin on Elastic Beanstalk
container_commands:
01_install_pma:
test: test -n "$PMA_VER" && test ! -f /tmp/phpmyadmin.tar.gz
command: |
cd /tmp
wget https://files.phpmyadmin.net/phpMyAdmin/${PMA_VER}/phpMyAdmin-${PMA_VER}-all-languages.tar.gz
wget https://files.phpmyadmin.net/phpMyAdmin/${PMA_VER}/phpMyAdmin-${PMA_VER}-all-languages.tar.gz.sha1
cd /tmp && sha1sum --check phpMyAdmin-${PMA_VER}-all-languages.tar.gz.sha1
if [[ $? == 0 ]]
then