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

Method from_platform

plugins/warp/src/matcher.rs:63–77  ·  view source on GitHub ↗

Create a matcher from the platforms signature subdirectory.

(platform: BNRef<Platform>)

Source from the content-addressed store, hash-verified

61impl Matcher {
62 /// Create a matcher from the platforms signature subdirectory.
63 pub fn from_platform(platform: BNRef<Platform>) -> Self {
64 let platform_name = platform.name().to_string();
65
66 // Get core and user signatures.
67 // TODO: Separate each file into own bucket for filtering?
68 let plat_core_sig_dir = core_signature_dir().join(&platform_name);
69 let mut data = get_data_from_dir(&plat_core_sig_dir);
70 let plat_user_sig_dir = user_signature_dir().join(&platform_name);
71 let user_data = get_data_from_dir(&plat_user_sig_dir);
72
73 data.extend(user_data);
74 let merged_data = Data::merge(data.values().cloned().collect::<Vec<_>>());
75 log::debug!("Loaded signatures: {:?}", data.keys());
76 Matcher::from_data(merged_data)
77 }
78
79 pub fn from_data(data: Data) -> Self {
80 let functions = data.functions.into_iter().fold(

Callers

nothing calls this directly

Calls 6

core_signature_dirFunction · 0.85
get_data_from_dirFunction · 0.85
user_signature_dirFunction · 0.85
joinMethod · 0.80
nameMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected