summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2017-10-18 17:03:37 -0400
committerBrian Potchik <brian@vector35.com>2017-10-19 19:21:50 -0400
commit01aec7ed694b537192093d37a7933f710bc0d70b (patch)
tree59458dfc88ec2108570f3574c460d6cad9c997b1 /python
parentd7701ace7ac399c26e3ef3eca17e36324c5ea19d (diff)
UI Updates for Product and Update Status.
Diffstat (limited to 'python')
-rw-r--r--python/__init__.py7
-rw-r--r--python/update.py2
2 files changed, 8 insertions, 1 deletions
diff --git a/python/__init__.py b/python/__init__.py
index f4a8fac8..729e4f8a 100644
--- a/python/__init__.py
+++ b/python/__init__.py
@@ -21,6 +21,7 @@
import atexit
import sys
+from time import gmtime
# Binary Ninja components
import _binaryninjacore as core
@@ -147,6 +148,12 @@ core_version = core.BNGetVersionString()
core_build_id = core.BNGetBuildId()
'''Build ID'''
+core_serial = core.BNGetSerialNumber()
+'''Serial Number'''
+
+core_expires = gmtime(core.BNGetLicenseExpirationTime())
+'''License Expiration'''
+
core_product = core.BNGetProduct()
'''Product string from the license file'''
diff --git a/python/update.py b/python/update.py
index be6962d7..1eb8ea61 100644
--- a/python/update.py
+++ b/python/update.py
@@ -154,7 +154,7 @@ class UpdateChannel(object):
def updates_available(self):
"""Whether updates are available (read-only)"""
errors = ctypes.c_char_p()
- result = core.BNAreUpdatesAvailable(self.name, errors)
+ result = core.BNAreUpdatesAvailable(self.name, None, None, errors)
if errors:
error_str = errors.value
core.BNFreeString(ctypes.cast(errors, ctypes.POINTER(ctypes.c_byte)))