Skip to content

Instantly share code, notes, and snippets.

@pakt
pakt / gist:1357704
Created November 11, 2011 10:39
vimrc
" http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc
filetype plugin on
set enc=utf-8
set relativenumber "beware: mutually exclusive with :set number :p
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
@pakt
pakt / .vimrc
Created December 14, 2011 17:15
simple linux .vimrc
" http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc
filetype plugin on
set enc=utf-8
set relativenumber "beware: mutually exclusive with :set number :p
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
@pakt
pakt / gist:3181434
Created July 26, 2012 10:41
phd s1
import itertools as it
from z3 import *
SEED = 0x48AEEFD486289CFB
TAPS = 0x9B1ADEDF847D3481
MASK=(1<<64)-1
def possible_buttons():
possible_taps = []
for i in range(16):
@pakt
pakt / asan_symbolize.py
Created November 9, 2012 10:07
fixed asan_symbolize
#!/usr/bin/env python
#===- lib/asan/scripts/asan_symbolize.py -----------------------------------===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
import bisect
@pakt
pakt / .bashrc
Created November 20, 2012 17:03
bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
@pakt
pakt / .zshrc
Created September 16, 2013 12:52
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="blinks"
# Example aliases
#!/bin/bash
sudo apt-get install aptitude curl vim git subversion zsh
sudo bash
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
exit
sudo chsh -s /usr/bin/zsh
rm .zshrc
wget https://gist.github.com/pakt/6580295/raw/9c68359dd26720ab779cd5efbc98c15d555b3498/.zshrc
git clone https://github.com/pakt/vim.git
ln -s vim/.vimrc .vimrc
diff --git a/pintraces/pin_taint.cpp b/pintraces/pin_taint.cpp
index 659ddc1..3a69392 100644
--- a/pintraces/pin_taint.cpp
+++ b/pintraces/pin_taint.cpp
@@ -218,6 +218,21 @@ context TaintTracker::getMemory()
FrameOption_t TaintTracker::introMemTaint(uint32_t addr, uint32_t length, const char *source, int64_t offset) {
FrameOption_t fb;
+ uint32_t buffer_size;
+ uint8_t value;
@pakt
pakt / rdwr.py
Created August 15, 2015 10:59
Direct read/write access to Python's memory
#
# read/write access to python's memory, using a custom bytearray.
# some code taken from: http://tinyurl.com/q7duzxj
#
# tested on:
# Python 2.7.10, ubuntu 32bit
# Python 2.7.8, win32
#
# example of correct output:
# inspecting int=0x41424344, at 0x0228f898
@pakt
pakt / eip_json.py
Created August 25, 2015 13:05
control eip with a bug in json encoding
import _json as j
import array
import struct
import sys
ver = sys.version_info[0]
eip = 0x11223344
eip_control = struct.pack("@I", 0) + \
struct.pack("@I", eip) + \