diff options
| author | Mason Reed <mason@vector35.com> | 2025-08-26 23:59:38 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-10-01 21:38:39 -0400 |
| commit | ede39aee7e00c40a43b67ca18dd8ab80ee863d85 (patch) | |
| tree | 67c5eda347ece2282e3c888f38066b496e06dec8 /plugins/warp/src/plugin/ffi.rs | |
| parent | a1c46813e7f279aa4cfdb9dbb91c45b559ebeacd (diff) | |
[WARP] Enhanced network support
Diffstat (limited to 'plugins/warp/src/plugin/ffi.rs')
| -rw-r--r-- | plugins/warp/src/plugin/ffi.rs | 12 |
1 files changed, 12 insertions, 0 deletions
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::{ @@ -88,6 +89,17 @@ pub unsafe extern "C" fn BNWARPUUIDGetString(uuid: *const Uuid) -> *mut c_char { } #[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) } |
