File tree 3 files changed +509
-21
lines changed
3 files changed +509
-21
lines changed Original file line number Diff line number Diff line change 1
1
"""Binary Ninja plugin for identifying and extracting files from container formats using Unblob
2
2
"""
3
3
4
- from binaryninja import core_ui_enabled
4
+ import platform
5
+ from os import environ
6
+ from binaryninja import core_ui_enabled , log_warn
5
7
from binaryninjaui import Sidebar
6
8
7
9
from .sidebar import BlobExtractorSidebarType
8
10
11
+
12
+ def _set_path_environ () -> None :
13
+ # This is a hack because unblob doesn't set shell=True when calling subprocess.run
14
+ if platform .system () == "Darwin" and "/opt/homebrew/bin" not in environ ["PATH" ]:
15
+ log_warn ("adding /opt/homebrew/bin to PATH" )
16
+ environ ["PATH" ] += ":/opt/homebrew/bin"
17
+
18
+
19
+ _set_path_environ ()
20
+
9
21
if core_ui_enabled () is True :
10
22
Sidebar .addSidebarWidgetType (BlobExtractorSidebarType ())
You can’t perform that action at this time.
0 commit comments