Skip to content

Instantly share code, notes, and snippets.

@icewall
icewall / vhd.py
Created August 3, 2016 14:10
classes helping update some VHD structures checksum
import os
import sys
import struct
class vhdStruct(object):
def __init__(self):
self._structSize = None
self._buffer = None
self._checsumOffset = None
self._offset = None
@icewall
icewall / getGUIDfunction.py
Last active August 31, 2022 14:21
IDA Pro python getGUID
def getGUID(ea):
data1 = idc.GetManyBytes(ea,4)
data1 = struct.unpack("<I",data1)[0]
#print "%08x" % (data1)
ea += 4
data2 = idc.GetManyBytes(ea,2)
data2 = struct.unpack("<H",data2)[0]
#print "%04x" % (data2)
@icewall
icewall / alloc_tracer.py
Last active September 30, 2016 15:33
Very very limited imitation of windbg !heap -p -a addr for gdb based on gdb python.
#!/usr/bin/env python
allocations = {}
class FunctionFinishBreakpoint(gdb.FinishBreakpoint):
def __init__ (self,allocation):
gdb.FinishBreakpoint.__init__(self,gdb.newest_frame(), internal=True)
self.silent = True
self.allocation = allocation
def stop(self):