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 / async-keylogger.go
Created January 2, 2017 21:18
simple windows keylogger using GetAsyncKeyState
package main
import (
"fmt"
"io"
"log"
"io/ioutil"
"time"
"golang.org/x/sys/windows"
)
@obonyojimmy
obonyojimmy / sclg4.c
Created January 3, 2017 04:48 — forked from aktau/sclg4.c
A simple WinAPI GetAsyncKeyState()-based keylogger, written a very long time ago. I dug it out of the archives because of a Hacker News post (https://news.ycombinator.com/item?id=7607082). For educational purposes only, of course.
/**
* Copyright (c) 2006, Nicolas Hillegeer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@obonyojimmy
obonyojimmy / Git-remote-repo.md
Created January 4, 2017 17:37
Git create remote repo

First, you create your branch locally:

git checkout -b

The remote branch is automatically created when you push it to the remote server. So when you feel ready for it, you can just do:

git push

Where is typically origin, the name which git gives to the remote you cloned from. Your colleagues would then just pull that branch, and it's automatically created locally.

@obonyojimmy
obonyojimmy / winsvc.go
Created January 7, 2017 03:28 — forked from chai2010/winsvc.go
Windows系统服务例子
// Copyright 2015 <chaishushan{AT}gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ingore
package main
import (
"flag"
@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)))
}