From ede39aee7e00c40a43b67ca18dd8ab80ee863d85 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 26 Aug 2025 23:59:38 -0400 Subject: [WARP] Enhanced network support --- plugins/warp/src/plugin/ffi.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'plugins/warp/src/plugin/ffi.rs') diff --git a/plugins/warp/src/plugin/ffi.rs b/plugins/warp/src/plugin/ffi.rs index 2826ed34..c1f5acb8 100644 --- a/plugins/warp/src/plugin/ffi.rs +++ b/plugins/warp/src/plugin/ffi.rs @@ -1,4 +1,5 @@ mod container; +mod file; mod function; use binaryninjacore_sys::{ @@ -87,6 +88,17 @@ pub unsafe extern "C" fn BNWARPUUIDGetString(uuid: *const Uuid) -> *mut c_char { BnString::into_raw(uuid_str.into()) } +#[no_mangle] +pub unsafe extern "C" fn BNWARPUUIDFromString(uuid_str: *mut c_char, uuid: *mut Uuid) -> bool { + if let Ok(uuid_str) = std::ffi::CStr::from_ptr(uuid_str).to_str() { + if let Some(parsed_uuid) = Uuid::parse_str(uuid_str).ok() { + *uuid = parsed_uuid; + return true; + } + } + false +} + #[no_mangle] pub unsafe extern "C" fn BNWARPUUIDEqual(a: *const Uuid, b: *const Uuid) -> bool { (*a) == (*b) -- cgit v1.3.1