def deserialize(d): op = EditFunctionOperation(vma=d['vma'], name=d['name'], args=d['args'], retval=d['retval']) Operation.deserialize(op, d) return op
def deserialize(d): op = CreateFunctionOperation(vma=d['vma'], name=d['name'], args=d['args'], retval=d['retval'], sym_type=d['sym_type']) Operation.deserialize(op, d) return op
def deserialize(d): op = LoadOperation() Operation.deserialize(op, d) return op
def deserialize(d): op = PassiveScanOperation() Operation.deserialize(op, d) return op
def deserialize(d): op = ActiveScanOperation(d['vma']) Operation.deserialize(op, d) return op
def deserialize(d): op = ModifySettingsOperation(d['options']) Operation.deserialize(op, d) return op
def deserialize(d): op = ModifyCStructOperation(d['name'], d['field_names'], d['field_types']) Operation.deserialize(op, d) return op
def deserialize(d): op = CreateCStructOperation(d['name'], d['is_packed']) Operation.deserialize(op, d) return op
def deserialize(d): op = DeleteCStructOperation(d['name']) Operation.deserialize(op, d) return op
def deserialize(d): op = CreateLabelOperation(d['vma'], d['label']) Operation.deserialize(op, d) return op
def deserialize(d): op = DefineDataOperation(d['type_kind'], d['type_name'], d['var_name'], d['vma']) Operation.deserialize(op, d) return op
def deserialize(d): op = UndefineDataOperation(d['vma']) Operation.deserialize(op, d) return op
def deserialize(d): op = DeleteFunctionOperation(vma=d['vma']) Operation.deserialize(op, d) return op
logger = logging.getLogger(__name__) STRUCTURE_TYPES = [ Function, Section, Symbol, Parcel, Branch, DataString, Comment, Label, CStruct, DefinedData, ] OPERATIONS = {cls.__name__: cls for cls in Operation.__subclasses__()} def DeserializeBinary(d): if d['kind'] == 'file': return BinaryFile.deserialize(d) elif d['kind'] == 'string': return BinaryString.deserialize(d) elif d['kind'] == 'file_model': return BinaryFileModel.deserialize(d) else: raise Exception("Unrecognized binary kind %s" % d['kind']) def DeserializeOperation(d): cls = d['op_name']
def deserialize(d): op = DeleteCommentOperation(d['vma']) Operation.deserialize(op, d) return op
def deserialize(d): op = CreateCommentOperation(d['vma'], d['comment']) Operation.deserialize(op, d) return op