From 4280e92fc4bf8040ed927ce5aadfc33ae5c43d14 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Mon, 29 Jul 2019 13:44:34 -0400 Subject: can now disable user plugins from headless via BN_DISABLE_USER_PLUGINS env var --- python/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'python') diff --git a/python/__init__.py b/python/__init__.py index 25543dc9..1ae4d5d9 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -163,7 +163,8 @@ def _init_plugins(): global _plugin_init if not _plugin_init: core.BNInitCorePlugins() - core.BNInitUserPlugins() + if not os.environ.get('BN_DISABLE_USER_PLUGINS'): + core.BNInitUserPlugins() core.BNInitRepoPlugins() if core.BNIsLicenseValidated(): _plugin_init = True @@ -252,7 +253,3 @@ def get_memory_usage_info(): result[info[i].name] = info[i].value core.BNFreeMemoryUsageInfo(info, count.value) return result - -#if not valid_import("binaryninjaui") and not core_ui_enabled(): -# #Use print because we're headless and log_functions won't work yet -# print("BINARYNINJAUI module not available.\nPlease re-run the install_api.py python script (with the appropriate version of python you plan to use) to properly set up your Binary Ninja python paths.") \ No newline at end of file -- cgit v1.3.1