summaryrefslogtreecommitdiff
path: root/python/startup.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2017-02-10 16:42:12 -0500
committerRusty Wagner <rusty@vector35.com>2017-02-10 16:42:12 -0500
commit4b988c0d24c8d8c8dc67485f3aaeb7106eb4af18 (patch)
tree2cd7242ff78a8f92cc268b2ccb7afc69734d9f6b /python/startup.py
parent8c42dabe92340b4d342f3b4e7594fb70f1890e41 (diff)
parentf8687791c32688a78b5e6667b2af9689816e41af (diff)
Merge branch 'dev'
Diffstat (limited to 'python/startup.py')
-rw-r--r--python/startup.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/python/startup.py b/python/startup.py
new file mode 100644
index 00000000..809f185b
--- /dev/null
+++ b/python/startup.py
@@ -0,0 +1,34 @@
+# Copyright (c) 2015-2016 Vector 35 LLC
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+import _binaryninjacore as core
+
+
+_plugin_init = False
+
+
+def _init_plugins():
+ global _plugin_init
+ if not _plugin_init:
+ _plugin_init = True
+ core.BNInitCorePlugins()
+ core.BNInitUserPlugins()
+ if not core.BNIsLicenseValidated():
+ raise RuntimeError("License is not valid. Please supply a valid license.")