Skip to content

Instantly share code, notes, and snippets.

View kokjo's full-sized avatar

Jonas Rudloff kokjo

View GitHub Profile
@kokjo
kokjo / keybase.md
Created September 28, 2014 11:48
Keybase

Keybase proof

I hereby claim:

  • I am kokjo on github.
  • I am jonasrudloff (https://keybase.io/jonasrudloff) on keybase.
  • I have a public key whose fingerprint is 02EC C7EC 3B68 CD16 73CA 6E7F 934E A12D 1536 A5BA

To claim this, I am signing this object:

class VardicSum r where
sums :: Integer -> r
instance VardicSum Integer where
sums x = x
instance (Integral a, VardicSum b) => VardicSum (a -> b) where
sums x y = sums (x + toInteger y)
main = do
@kokjo
kokjo / encoder.py
Created August 28, 2014 16:15
Simple shellcode encoder for arm.
from pwn import *
from random import sample, choice
key = random.randint(0, 2**32)
free_regs = ["r%d" % i for i in range(8)]
key_reg, len_reg, addr_reg, data_reg = sample(free_regs, 4)
if key_reg == "r7": data_reg, key_reg = key_reg, data_reg
reg_dict = {
@kokjo
kokjo / bitcoin.py
Created May 19, 2013 18:47
Simple and short bitcoind jsonrpc api access.
import jsonrpc
from jsonrpc import ServiceProxy
from os.path import expanduser
conf = {p[0]: p[1].strip() for p in
(l.split("=", 1) for l in open(expanduser("~/.bitcoin/bitcoin.conf")))
if len(p) == 2}
proxy = ServiceProxy("http://%(rpcuser)s:%(rpcpassword)[email protected]:8332"%conf)
info = proxy.getinfo()
load "String";
load "Char";
load "Math";
load "List";
load "Listsort";
load "TextIO";
load "Int";
(* Opg 1 *)
(* a *)