MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / getPriority

Method getPriority

examples/triage/view.cpp:281–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279
280
281int TriageViewType::getPriority(BinaryViewRef data, const QString&)
282{
283 BinaryNinja::Ref<BinaryNinja::Settings> settings = BinaryNinja::Settings::Instance();
284 auto analysisMode = settings->Get<std::string>("analysis.mode", data);
285 bool full = analysisMode == "full";
286 bool intermediate = analysisMode == "intermediate";
287 bool alwaysPrefer = settings->Get<bool>("triage.preferSummaryView", data);
288 bool preferForRaw = settings->Get<bool>("triage.preferSummaryViewForRaw", data);
289 if (data->IsExecutable() && (alwaysPrefer || (!full && !intermediate)))
290 return 100;
291 if (data->GetLength() > 0)
292 {
293 if (alwaysPrefer || preferForRaw)
294 return 35;
295 if (data->IsExecutable())
296 return 25;
297 return 1;
298 }
299 return 0;
300}
301
302
303QWidget* TriageViewType::create(BinaryViewRef data, ViewFrame* frame)

Callers

nothing calls this directly

Calls 3

Get<bool>Method · 0.80
IsExecutableMethod · 0.80
GetLengthMethod · 0.45

Tested by

no test coverage detected