Passes

FeaturePass

class qbindiff.passes.FeaturePass(distance: Distance)[source]

Bases: object

Run all the feature extractors previously registered and compute the similarity matrix

Parameters:

distance – distance to compute the similarity of type qbindiff.types.Distance

distance(key: str) Distance[source]

Returns the correct distance for the given feature key

register_extractor(extractor: FeatureExtractor, distance: Distance | None = None) None[source]

Register a feature extractor optionally specifying a distance to use. The class will be called when the visitor will traverse the graph.

ZeroPass

class qbindiff.passes.ZeroPass(sim_matrix: SimMatrix, primary: Program, secondary: Program, primary_mapping: dict[Addr, Idx], secondary_mapping: dict[Addr, Idx], primary_features: dict[Addr, FeatureCollector], secondary_features: dict[Addr, FeatureCollector])[source]

Bases:

Set to zero all the -1 entries in the similarity matrix