#!/usr/bin/env python ''' Cody Pierce (Team USA!) Finds all functions in a binary that are xrefed from data for exploitation ''' from idautils import * ea = ScreenEA() datafuncs = [] # Loop from start to end in the current segment for funcea in Functions(SegStart(ea), SegEnd(ea)): for ref in DataRefsTo(funcea): fname = GetFunctionName(funcea) datafuncs.append({"ref": ref,"name": fname}) datafuncs.sort() for x in datafuncs: print "0x%08x: %s" % (x["ref"], x["name"])