Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pakt
pakt / qemu-config-windows-guest.txt
Created July 21, 2017 08:12
qemu working config
configure bridged network as described here:
https://wiki.debian.org/QEMU#Host_and_guests_on_same_network
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto br0
iface br0 inet dhcp
@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) + \
@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
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;
#!/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
@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
@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 / 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 / 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 / .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