summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-06-24 09:19:08 -0400
committerPeter LaFosse <peter@vector35.com>2021-09-05 10:08:09 -0400
commitd37f7abfe4c1b23426b0fbdc85ae31788602ff28 (patch)
treeff106d8d52afc7cb4d85a1378a41e5c72a288c7d /python
parente0389d244e6211126267e060a9c61a1e75481b76 (diff)
Don't inherit from object anymore
Diffstat (limited to 'python')
-rw-r--r--python/__init__.py2
-rw-r--r--python/architecture.py12
-rw-r--r--python/basicblock.py5
-rw-r--r--python/binaryview.py55
-rw-r--r--python/callingconvention.py2
-rw-r--r--python/databuffer.py2
-rw-r--r--python/datarender.py4
-rw-r--r--python/fileaccessor.py2
-rw-r--r--python/filemetadata.py6
-rw-r--r--python/flowgraph.py10
-rw-r--r--python/function.py18
-rw-r--r--python/functionrecognizer.py2
-rw-r--r--python/highlevelil.py10
-rw-r--r--python/highlight.py2
-rw-r--r--python/interaction.py32
-rw-r--r--python/lineardisassembly.py8
-rw-r--r--python/lowlevelil.py30
-rw-r--r--python/mediumlevelil.py12
-rw-r--r--python/metadata.py2
-rw-r--r--python/plugin.py6
-rw-r--r--python/pluginmanager.py6
-rw-r--r--python/scriptingprovider.py10
-rw-r--r--python/settings.py2
-rw-r--r--python/transform.py2
-rw-r--r--python/typelibrary.py2
-rw-r--r--python/types.py32
-rw-r--r--python/update.py4
-rw-r--r--python/variable.py16
28 files changed, 148 insertions, 148 deletions
diff --git a/python/__init__.py b/python/__init__.py
index 0b05f5b5..c46fb0d6 100644
--- a/python/__init__.py
+++ b/python/__init__.py
@@ -90,7 +90,7 @@ def get_install_directory():
return core.BNGetInstallDirectory()
-class _DestructionCallbackHandler(object):
+class _DestructionCallbackHandler:
def __init__(self):
self._cb = core.BNObjectDestructionCallbacks()
self._cb.context = 0
diff --git a/python/architecture.py b/python/architecture.py
index a6bac57b..3a37b5b6 100644
--- a/python/architecture.py
+++ b/python/architecture.py
@@ -63,7 +63,7 @@ IntrinsicType = Union[IntrinsicName, 'lowlevelil.ILIntrinsic', IntrinsicIndex]
@dataclass(frozen=False)
-class RegisterInfo(object):
+class RegisterInfo:
full_width_reg:RegisterName
offset:int
size:int = 0
@@ -81,7 +81,7 @@ class RegisterInfo(object):
@dataclass(frozen=False)
-class RegisterStackInfo(object):
+class RegisterStackInfo:
storage_regs:List[RegisterName]
top_relative_regs:List[RegisterName]
stack_top_reg:RegisterName
@@ -92,7 +92,7 @@ class RegisterStackInfo(object):
@dataclass(frozen=True)
-class IntrinsicInput(object):
+class IntrinsicInput:
type:'types.Type'
name:str = ""
@@ -103,7 +103,7 @@ class IntrinsicInput(object):
@dataclass(frozen=True)
-class IntrinsicInfo(object):
+class IntrinsicInfo:
inputs:List[IntrinsicInput]
outputs:List['types.Type']
index:Optional[int] = None
@@ -113,7 +113,7 @@ class IntrinsicInfo(object):
@dataclass(frozen=True)
-class InstructionBranch(object):
+class InstructionBranch:
type:BranchType
target:int
arch:'Architecture'
@@ -125,7 +125,7 @@ class InstructionBranch(object):
@dataclass(frozen=False)
-class InstructionInfo(object):
+class InstructionInfo:
length:int = 0
arch_transition_by_target_addr:bool = False
branch_delay:bool = False
diff --git a/python/basicblock.py b/python/basicblock.py
index fa360a53..7104f418 100644
--- a/python/basicblock.py
+++ b/python/basicblock.py
@@ -48,9 +48,8 @@ class BasicBlockEdge:
return f"<{self.type.name}: {self.target.start:#x}>"
-
-class BasicBlock(object):
- def __init__(self, handle:core.BNBasicBlock, view:Optional['binaryninja.binaryview.BinaryView']=None):
+class BasicBlock:
+ def __init__(self, handle:core.BNBasicBlockHandle, view:Optional['binaryninja.binaryview.BinaryView']=None):
self._view = view
self.handle = core.handle_of_type(handle, core.BNBasicBlock)
self._arch = None
diff --git a/python/binaryview.py b/python/binaryview.py
index 1d779f7e..53cc308a 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -69,7 +69,7 @@ PathType = Union[str, os.PathLike]
InstructionsType = Generator[Tuple[List['_function.InstructionTextToken'], int], None, None]
NotificationType = Mapping['BinaryDataNotification', 'BinaryDataNotificationCallbacks']
-class ReferenceSource(object):
+class ReferenceSource:
def __init__(self, func:Optional['_function.Function'], arch:Optional['architecture.Architecture'],
addr:int):
self._function = func
@@ -128,7 +128,7 @@ class ReferenceSource(object):
return self._address
-class BinaryDataNotification(object):
+class BinaryDataNotification:
def __init__(self):
pass
@@ -205,7 +205,7 @@ class BinaryDataNotification(object):
pass
-class StringReference(object):
+class StringReference:
_decodings = {
StringType.AsciiString: "ascii",
StringType.Utf8String: "utf-8",
@@ -260,7 +260,7 @@ class StringReference(object):
return self._view
-class AnalysisCompletionEvent(object):
+class AnalysisCompletionEvent:
"""
The ``AnalysisCompletionEvent`` object provides an asynchronous mechanism for receiving
callbacks when analysis is complete. The callback runs once. A completion event must be added
@@ -324,7 +324,7 @@ class AnalysisCompletionEvent(object):
self._view = value
-class BinaryViewEvent(object):
+class BinaryViewEvent:
"""
The ``BinaryViewEvent`` object provides a mechanism for receiving callbacks when a BinaryView
is Finalized or the initial analysis is finished. The BinaryView finalized callbacks run before the
@@ -365,7 +365,8 @@ class BinaryViewEvent(object):
except:
log.log_error(traceback.format_exc())
-class ActiveAnalysisInfo(object):
+
+class ActiveAnalysisInfo:
def __init__(self, func:'_function.Function', analysis_time:int, update_count:int, submit_count:int):
self._func = func
self._analysis_time = analysis_time
@@ -392,7 +393,7 @@ class ActiveAnalysisInfo(object):
return self._submit_count
-class AnalysisInfo(object):
+class AnalysisInfo:
def __init__(self, state:AnalysisState, analysis_time:int, active_info:List[ActiveAnalysisInfo]):
self._state = AnalysisState(state)
self._analysis_time = analysis_time
@@ -414,7 +415,7 @@ class AnalysisInfo(object):
return self._active_info
-class AnalysisProgress(object):
+class AnalysisProgress:
def __init__(self, state:AnalysisState, count:int, total:int):
self._state = state
self._count = count
@@ -449,7 +450,7 @@ class AnalysisProgress(object):
return self._total
-class BinaryDataNotificationCallbacks(object):
+class BinaryDataNotificationCallbacks:
def __init__(self, view:'BinaryView', notify:'BinaryDataNotification'):
self._view = view
self._notify = notify
@@ -1006,8 +1007,8 @@ class BinaryViewType(metaclass=_BinaryViewTypeMetaclass):
BinaryViewEvent.register(BinaryViewEventType.BinaryViewInitialAnalysisCompletionEvent, callback)
-class Segment(object):
- def __init__(self, handle:core.BNSegment):
+class Segment:
+ def __init__(self, handle:core.BNSegmentHandle):
self.handle = handle
def __del__(self):
@@ -1103,9 +1104,9 @@ class Segment(object):
core.BNFreeRelocationRanges(ranges, count)
-class Section(object):
- def __init__(self, handle:core.BNSection):
- self.handle = core.handle_of_type(handle, core.BNSection)
+class Section:
+ def __init__(self, handle:core.BNSectionHandle):
+ self.handle = handle
def __del__(self):
core.BNFreeSection(self.handle)
@@ -1174,9 +1175,9 @@ class Section(object):
return self.start + len(self)
-class TagType(object):
- def __init__(self, handle:core.BNTagType):
- self.handle = core.handle_of_type(handle, core.BNTagType)
+class TagType:
+ def __init__(self, handle:core.BNTagTypeHandle):
+ self.handle = handle
def __del__(self):
core.BNFreeTagType(self.handle)
@@ -1239,9 +1240,9 @@ class TagType(object):
core.BNTagTypeSetType(self.handle, value)
-class Tag(object):
- def __init__(self, handle:core.BNTag):
- self.handle = core.handle_of_type(handle, core.BNTag)
+class Tag:
+ def __init__(self, handle:core.BNTagHandle):
+ self.handle = handle
def __del__(self):
core.BNFreeTag(self.handle)
@@ -1285,7 +1286,7 @@ class _BinaryViewAssociatedDataStore(associateddatastore._AssociatedDataStore):
_defaults = {}
-class BinaryView(object):
+class BinaryView:
"""
``class BinaryView`` implements a view on binary data, and presents a queryable interface of a binary file. One key
job of BinaryView is file format parsing which allows Binary Ninja to read, write, insert, remove portions
@@ -5429,7 +5430,7 @@ class BinaryView(object):
...
cf fa ed fe 07 00 00 01 ........
"""
- class LinearDisassemblyIterator(object):
+ class LinearDisassemblyIterator:
def __init__(self, view, settings):
self._view = view
self._settings = settings
@@ -6685,7 +6686,7 @@ class BinaryView(object):
return self.parse_expression(expression, here)
-class BinaryReader(object):
+class BinaryReader:
"""
``class BinaryReader`` is a convenience class for reading binary data.
@@ -7006,7 +7007,7 @@ class BinaryReader(object):
core.BNSeekBinaryReaderRelative(self._handle, offset)
-class BinaryWriter(object):
+class BinaryWriter:
"""
``class BinaryWriter`` is a convenience class for writing binary data.
@@ -7254,7 +7255,7 @@ class BinaryWriter(object):
core.BNSeekBinaryWriterRelative(self._handle, offset)
-class StructuredDataValue(object):
+class StructuredDataValue:
def __init__(self, type, address, value, endian):
self._type = type
self._address = address
@@ -7319,7 +7320,7 @@ class StructuredDataValue(object):
return str(self)
-class StructuredDataView(object):
+class StructuredDataView:
"""
``class StructuredDataView`` is a convenience class for reading structured binary data.
@@ -7441,7 +7442,7 @@ class CoreDataVariable:
auto_discovered:bool
-class DataVariable(object):
+class DataVariable:
def __init__(self, var:CoreDataVariable, view:'BinaryView'):
self._var = var
self._view = view
diff --git a/python/callingconvention.py b/python/callingconvention.py
index 60aa3f84..f4d7682e 100644
--- a/python/callingconvention.py
+++ b/python/callingconvention.py
@@ -30,7 +30,7 @@ from . import function
from . import architecture
-class CallingConvention(object):
+class CallingConvention:
name = None
caller_saved_regs = []
callee_saved_regs = []
diff --git a/python/databuffer.py b/python/databuffer.py
index 83e6018c..bb6a8ca5 100644
--- a/python/databuffer.py
+++ b/python/databuffer.py
@@ -23,7 +23,7 @@ import ctypes
# Binary Ninja components
from . import _binaryninjacore as core
-class DataBuffer(object):
+class DataBuffer:
def __init__(self, contents:bytes=b"", handle=None):
if handle is not None:
self.handle = core.handle_of_type(handle, core.BNDataBuffer)
diff --git a/python/datarender.py b/python/datarender.py
index fbdebd0a..c44e444f 100644
--- a/python/datarender.py
+++ b/python/datarender.py
@@ -33,7 +33,7 @@ from . import types
from . import highlight
-class TypeContext(object):
+class TypeContext:
def __init__(self, _type, _offset):
self._type = _type
self._offset = _offset
@@ -48,7 +48,7 @@ class TypeContext(object):
"""The offset into the given type object"""
return self._offset
-class DataRenderer(object):
+class DataRenderer:
"""
DataRenderer objects tell the Linear View how to render specific types.
diff --git a/python/fileaccessor.py b/python/fileaccessor.py
index f848cb22..7d46c5c5 100644
--- a/python/fileaccessor.py
+++ b/python/fileaccessor.py
@@ -25,7 +25,7 @@ import ctypes
from . import _binaryninjacore as core
from . import log
-class FileAccessor(object):
+class FileAccessor:
def __init__(self):
self._cb = core.BNFileAccessor()
self._cb.context = 0
diff --git a/python/filemetadata.py b/python/filemetadata.py
index ee8e8271..954467d7 100644
--- a/python/filemetadata.py
+++ b/python/filemetadata.py
@@ -33,7 +33,7 @@ from . import binaryview
ProgressFuncType = Callable[[int, int], bool]
ViewName = str
-class NavigationHandler(object):
+class NavigationHandler:
def _register(self, handle) -> None:
self._cb = core.BNNavigationHandler()
self._cb.context = 0
@@ -74,7 +74,7 @@ class NavigationHandler(object):
return NotImplemented
-class SaveSettings(object):
+class SaveSettings:
"""
``class SaveSettings`` is used to specify actions and options that apply to saving a database (.bndb).
"""
@@ -112,7 +112,7 @@ class _FileMetadataAssociatedDataStore(associateddatastore._AssociatedDataStore)
_defaults = {}
-class FileMetadata(object):
+class FileMetadata:
"""
``class FileMetadata`` represents the file being analyzed by Binary Ninja. It is responsible for opening,
closing, creating the database (.bndb) files, and is used to keep track of undoable actions.
diff --git a/python/flowgraph.py b/python/flowgraph.py
index 47ed187c..0fd2ae09 100644
--- a/python/flowgraph.py
+++ b/python/flowgraph.py
@@ -38,7 +38,7 @@ from . import highlight
from . import interaction
-class FlowGraphEdge(object):
+class FlowGraphEdge:
def __init__(self, branch_type, source, target, points, back_edge, style):
self.type = BranchType(branch_type)
self.source = source
@@ -58,7 +58,7 @@ class FlowGraphEdge(object):
return hash((self.type, self.source, self.target, self.points, self.back_edge, self.style))
-class EdgeStyle(object):
+class EdgeStyle:
def __init__(self, style=None, width=None, theme_color=None):
self.style = style if style is not None else EdgePenStyle.SolidLine
self.width = width if width is not None else 0
@@ -82,7 +82,7 @@ class EdgeStyle(object):
def __hash__(self):
return hash((self.style, self.width, self.color))
-class FlowGraphNode(object):
+class FlowGraphNode:
def __init__(self, graph = None, handle = None):
if handle is None:
if graph is None:
@@ -335,7 +335,7 @@ class FlowGraphNode(object):
return core.BNIsNodeValidForFlowGraph(graph.handle, self.handle)
-class FlowGraphLayoutRequest(object):
+class FlowGraphLayoutRequest:
def __init__(self, graph, callback = None):
self.on_complete = callback
self._cb = ctypes.CFUNCTYPE(None, ctypes.c_void_p)(self._complete)
@@ -367,7 +367,7 @@ class FlowGraphLayoutRequest(object):
self.on_complete = None
-class FlowGraph(object):
+class FlowGraph:
"""
``class FlowGraph`` implements a directed flow graph to be shown in the UI. This class allows plugins to
create custom flow graphs and render them in the UI using the flow graph report API.
diff --git a/python/function.py b/python/function.py
index 68e9ceda..5111ea5d 100644
--- a/python/function.py
+++ b/python/function.py
@@ -59,7 +59,7 @@ ILInstructionType = Union['lowlevelil.LowLevelILInstruction', 'mediumlevelil.Med
def _function_name_():
return inspect.stack()[1][0].f_code.co_name
-class ArchAndAddr(object):
+class ArchAndAddr:
def __init__(self, arch:Optional['architecture.Architecture']=None, addr:int=0):
self._arch = architecture.CoreArchitecture._from_cache(arch)
self._addr = addr
@@ -80,7 +80,7 @@ class _FunctionAssociatedDataStore(associateddatastore._AssociatedDataStore):
_defaults = {}
-class DisassemblySettings(object):
+class DisassemblySettings:
def __init__(self, handle:core.BNDisassemblySettings=None):
if handle is None:
self.handle = core.BNCreateDisassemblySettings()
@@ -117,7 +117,7 @@ class DisassemblySettings(object):
core.BNSetDisassemblySettingsOption(self.handle, option, state)
-class ILReferenceSource(object):
+class ILReferenceSource:
def __init__(self, func:Optional['Function'], arch:Optional['architecture.Architecture'], addr:int,
il_type:FunctionGraphType, expr_id:ExpressionIndex):
self._function = func
@@ -212,7 +212,7 @@ class ILReferenceSource(object):
self._expr_id = value
-class VariableReferenceSource(object):
+class VariableReferenceSource:
def __init__(self, var:'variable.Variable', src:ILReferenceSource):
self._var = var
self._src = src
@@ -247,7 +247,7 @@ class VariableReferenceSource(object):
self._src = value
-class Function(object):
+class Function:
_associated_data = {}
def __init__(self, view:Optional['binaryview.BinaryView']=None, handle:Optional[core.BNFunction]=None):
@@ -3092,7 +3092,7 @@ class Function(object):
return None
-class AdvancedFunctionAnalysisDataRequestor(object):
+class AdvancedFunctionAnalysisDataRequestor:
def __init__(self, func:'Function'=None):
self._function = func
if self._function is not None:
@@ -3120,7 +3120,7 @@ class AdvancedFunctionAnalysisDataRequestor(object):
self._function = None
-class DisassemblyTextLine(object):
+class DisassemblyTextLine:
def __init__(self, tokens:List['InstructionTextToken'], address:int=None, il_instr:ILInstructionType=None,
color:Union['_highlight.HighlightColor', HighlightStandardColor]=None):
self._address = address
@@ -3176,7 +3176,7 @@ class DisassemblyTextLine(object):
self._highlight = value
-class DisassemblyTextRenderer(object):
+class DisassemblyTextRenderer:
def __init__(self, func:AnyFunctionType=None, settings:'DisassemblySettings'=None,
handle:core.BNDisassemblySettings=None):
if handle is None:
@@ -3441,7 +3441,7 @@ class DisassemblyTextRenderer(object):
core.BNFreeDisassemblyTextLines(new_lines, count.value)
-class InstructionTextToken(object):
+class InstructionTextToken:
"""
``class InstructionTextToken`` is used to tell the core about the various components in the disassembly views.
diff --git a/python/functionrecognizer.py b/python/functionrecognizer.py
index ff639aca..55af199d 100644
--- a/python/functionrecognizer.py
+++ b/python/functionrecognizer.py
@@ -30,7 +30,7 @@ from . import log
from . import mediumlevelil
-class FunctionRecognizer(object):
+class FunctionRecognizer:
_instance = None
diff --git a/python/highlevelil.py b/python/highlevelil.py
index 26ad5045..2c4263d5 100644
--- a/python/highlevelil.py
+++ b/python/highlevelil.py
@@ -43,7 +43,7 @@ InstructionIndex = NewType('InstructionIndex', int)
HLILInstructionsType = Generator['HighLevelILInstruction', None, None]
HLILBasicBlocksType = Generator['HighLevelILBasicBlock', None, None]
-class HighLevelILOperationAndSize(object):
+class HighLevelILOperationAndSize:
def __init__(self, operation, size):
self._operation = operation
self._size = size
@@ -85,7 +85,7 @@ class HighLevelILOperationAndSize(object):
self._size = value
-class GotoLabel(object):
+class GotoLabel:
def __init__(self, function, id):
self._function = function
self._id = id
@@ -117,7 +117,7 @@ class GotoLabel(object):
return self._function.get_label_uses(self._id)
-class HighLevelILInstruction(object):
+class HighLevelILInstruction:
"""
``class HighLevelILInstruction`` High Level Intermediate Language Instructions form an abstract syntax tree of
the code. Control flow structures are present as high level constructs in the HLIL tree.
@@ -628,7 +628,7 @@ class HighLevelILInstruction(object):
return core.BNGetHighLevelILSSAVarVersionAtILInstruction(self._function.handle, var_data, self._instr_index)
-class HighLevelILExpr(object):
+class HighLevelILExpr:
"""
``class HighLevelILExpr`` hold the index of IL Expressions.
@@ -644,7 +644,7 @@ class HighLevelILExpr(object):
-class HighLevelILFunction(object):
+class HighLevelILFunction:
"""
``class HighLevelILFunction`` contains the a HighLevelILInstruction object that makes up the abstract syntax tree of
a function.
diff --git a/python/highlight.py b/python/highlight.py
index 539e71a5..59c9025a 100644
--- a/python/highlight.py
+++ b/python/highlight.py
@@ -24,7 +24,7 @@ from . import _binaryninjacore as core
from .enums import HighlightColorStyle, HighlightStandardColor
-class HighlightColor(object):
+class HighlightColor:
def __init__(self, color = None, mix_color = None, mix = None, red = None, green = None, blue = None, alpha = 255):
if (red is not None) and (green is not None) and (blue is not None):
self._style = HighlightColorStyle.CustomHighlightColor
diff --git a/python/interaction.py b/python/interaction.py
index a22987bf..a8b0abbc 100644
--- a/python/interaction.py
+++ b/python/interaction.py
@@ -30,7 +30,7 @@ from . import log
from . import flowgraph
-class LabelField(object):
+class LabelField:
"""
``LabelField`` adds a text label to the display.
"""
@@ -57,7 +57,7 @@ class LabelField(object):
self._text = value
-class SeparatorField(object):
+class SeparatorField:
"""
``SeparatorField`` adds vertical separation to the display.
"""
@@ -72,7 +72,7 @@ class SeparatorField(object):
pass
-class TextLineField(object):
+class TextLineField:
"""
``TextLineField`` Adds prompt for text string input. Result is stored in self.result as a string on completion.
"""
@@ -111,7 +111,7 @@ class TextLineField(object):
self._result = value
-class MultilineTextField(object):
+class MultilineTextField:
"""
``MultilineTextField`` add multi-line text string input field. Result is stored in self.result
as a string. This option is not supported on the command-line.
@@ -151,7 +151,7 @@ class MultilineTextField(object):
self._result = value
-class IntegerField(object):
+class IntegerField:
"""
``IntegerField`` add prompt for integer. Result is stored in self.result as an int.
"""
@@ -190,7 +190,7 @@ class IntegerField(object):
self._result = value
-class AddressField(object):
+class AddressField:
"""
``AddressField`` prompts the user for an address. By passing the optional view and current_address parameters
offsets can be used instead of just an address. The result is stored as in int in self.result.
@@ -256,7 +256,7 @@ class AddressField(object):
self._result = value
-class ChoiceField(object):
+class ChoiceField:
"""
``ChoiceField`` prompts the user to choose from the list of strings provided in ``choices``. Result is stored
in self.result as an index in to the choices array.
@@ -313,7 +313,7 @@ class ChoiceField(object):
self._result = value
-class OpenFileNameField(object):
+class OpenFileNameField:
"""
``OpenFileNameField`` prompts the user to specify a file name to open. Result is stored in self.result as a string.
"""
@@ -362,7 +362,7 @@ class OpenFileNameField(object):
self._result = value
-class SaveFileNameField(object):
+class SaveFileNameField:
"""
``SaveFileNameField`` prompts the user to specify a file name to save. Result is stored in self.result as a string.
"""
@@ -421,7 +421,7 @@ class SaveFileNameField(object):
self._result = value
-class DirectoryNameField(object):
+class DirectoryNameField:
"""
``DirectoryNameField`` prompts the user to specify a directory name to open. Result is stored in self.result as
a string.
@@ -471,7 +471,7 @@ class DirectoryNameField(object):
self._result = value
-class InteractionHandler(object):
+class InteractionHandler:
_interaction_handler = None
def __init__(self):
@@ -716,7 +716,7 @@ class InteractionHandler(object):
return MessageBoxButtonResult.CancelButton
-class PlainTextReport(object):
+class PlainTextReport:
def __init__(self, title, contents, view = None):
self._view = view
self._title = title
@@ -753,7 +753,7 @@ class PlainTextReport(object):
self._contents = value
-class MarkdownReport(object):
+class MarkdownReport:
def __init__(self, title, contents, plaintext = "", view = None):
self._view = view
self._title = title
@@ -799,7 +799,7 @@ class MarkdownReport(object):
self._plaintext = value
-class HTMLReport(object):
+class HTMLReport:
def __init__(self, title, contents, plaintext = "", view = None):
self._view = view
self._title = title
@@ -845,7 +845,7 @@ class HTMLReport(object):
self._plaintext = value
-class FlowGraphReport(object):
+class FlowGraphReport:
def __init__(self, title, graph, view = None):
self._view = view
self._title = title
@@ -879,7 +879,7 @@ class FlowGraphReport(object):
self._graph = value
-class ReportCollection(object):
+class ReportCollection:
def __init__(self, handle = None):
if handle is None:
self.handle = core.BNCreateReportCollection()
diff --git a/python/lineardisassembly.py b/python/lineardisassembly.py
index 3cbdd06e..3b539af4 100644
--- a/python/lineardisassembly.py
+++ b/python/lineardisassembly.py
@@ -28,7 +28,7 @@ from . import basicblock
from .enums import LinearViewObjectIdentifierType
-class LinearDisassemblyLine(object):
+class LinearDisassemblyLine:
def __init__(self, line_type, func, block, contents):
self.type = line_type
self.function = func
@@ -42,7 +42,7 @@ class LinearDisassemblyLine(object):
return str(self.contents)
-class LinearViewObjectIdentifier(object):
+class LinearViewObjectIdentifier:
def __init__(self, name, start = None, end = None):
self._name = name
self._start = start
@@ -126,7 +126,7 @@ class LinearViewObjectIdentifier(object):
return result
-class LinearViewObject(object):
+class LinearViewObject:
def __init__(self, handle, parent = None):
self.handle = handle
self._parent = parent
@@ -329,7 +329,7 @@ class LinearViewObject(object):
return LinearViewObject(core.BNCreateLinearViewHighLevelILSSAForm(view.handle, settings))
-class LinearViewCursor(object):
+class LinearViewCursor:
def __init__(self, root_object, handle = None):
if handle is not None:
self.handle = handle
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index 55da5993..093dd212 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -47,7 +47,7 @@ LLILInstructionsType = Generator['LowLevelILInstruction', None, None]
LLILBasicBlocksType = Generator['LowLevelILBasicBlock', None, None]
-class LowLevelILLabel(object):
+class LowLevelILLabel:
def __init__(self, handle:core.BNLowLevelILLabel=None):
if handle is None:
self.handle = (core.BNLowLevelILLabel * 1)()
@@ -56,7 +56,7 @@ class LowLevelILLabel(object):
self.handle = handle
@dataclass(frozen=True)
-class ILRegister(object):
+class ILRegister:
arch:'architecture.Architecture'
index:'architecture.RegisterIndex'
@@ -95,7 +95,7 @@ class ILRegister(object):
@dataclass(frozen=True)
-class ILRegisterStack(object):
+class ILRegisterStack:
arch:'architecture.Architecture'
index:'architecture.RegisterStackIndex'
@@ -118,7 +118,7 @@ class ILRegisterStack(object):
@dataclass(frozen=True)
-class ILFlag(object):
+class ILFlag:
arch:'architecture.Architecture'
index:'architecture.FlagIndex'
@@ -144,7 +144,7 @@ class ILFlag(object):
@dataclass(frozen=True)
-class ILSemanticFlagClass(object):
+class ILSemanticFlagClass:
arch:'architecture.Architecture'
index:'architecture.SemanticClassIndex'
@@ -163,7 +163,7 @@ class ILSemanticFlagClass(object):
@dataclass(frozen=True)
-class ILSemanticFlagGroup(object):
+class ILSemanticFlagGroup:
arch:'architecture.Architecture'
index:'architecture.SemanticGroupIndex'
@@ -182,7 +182,7 @@ class ILSemanticFlagGroup(object):
@dataclass(frozen=True)
-class ILIntrinsic(object):
+class ILIntrinsic:
arch:'architecture.Architecture'
index:'architecture.IntrinsicIndex'
@@ -208,7 +208,7 @@ class ILIntrinsic(object):
@dataclass(frozen=True)
-class SSARegister(object):
+class SSARegister:
reg:ILRegister
version:int
@@ -217,7 +217,7 @@ class SSARegister(object):
@dataclass(frozen=True)
-class SSARegisterStack(object):
+class SSARegisterStack:
reg_stack:ILRegisterStack
version:int
@@ -226,7 +226,7 @@ class SSARegisterStack(object):
@dataclass(frozen=True)
-class SSAFlag(object):
+class SSAFlag:
flag:ILFlag
version:int
@@ -235,7 +235,7 @@ class SSAFlag(object):
@dataclass(frozen=True)
-class SSARegisterOrFlag(object):
+class SSARegisterOrFlag:
reg_or_flag:Union[ILRegister, ILFlag]
version:int
@@ -244,7 +244,7 @@ class SSARegisterOrFlag(object):
@dataclass(frozen=True)
-class LowLevelILOperationAndSize(object):
+class LowLevelILOperationAndSize:
operation:'LowLevelILOperation'
size:int
@@ -254,7 +254,7 @@ class LowLevelILOperationAndSize(object):
return "<{self.operation.name} {self.size}>"
-class LowLevelILInstruction(object):
+class LowLevelILInstruction:
"""
``class LowLevelILInstruction`` Low Level Intermediate Language Instructions are infinite length tree-based
instructions. Tree-based instructions use infix notation with the left hand operand being the destination operand.
@@ -933,7 +933,7 @@ class LowLevelILInstruction(object):
@dataclass(frozen=True)
-class LowLevelILExpr(object):
+class LowLevelILExpr:
"""
``class LowLevelILExpr`` hold the index of IL Expressions.
@@ -946,7 +946,7 @@ class LowLevelILExpr(object):
return self.index
-class LowLevelILFunction(object):
+class LowLevelILFunction:
"""
``class LowLevelILFunction`` contains the list of LowLevelILExpr objects that make up a function. LowLevelILExpr
objects can be added to the LowLevelILFunction by calling :func:`append` and passing the result of the various class
diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py
index fdc4c2e9..6d038da0 100644
--- a/python/mediumlevelil.py
+++ b/python/mediumlevelil.py
@@ -42,7 +42,7 @@ MLILInstructionsType = Generator['MediumLevelILInstruction', None, None]
MLILBasicBlocksType = Generator['MediumLevelILBasicBlock', None, None]
-class SSAVariable(object):
+class SSAVariable:
def __init__(self, var:'variable.Variable', version:int):
self._var = var
self._version = version
@@ -80,7 +80,7 @@ class SSAVariable(object):
self._version = value
-class MediumLevelILLabel(object):
+class MediumLevelILLabel:
def __init__(self, handle:Optional[core.BNMediumLevelILLabel]=None):
if handle is None:
self.handle = (core.BNMediumLevelILLabel * 1)()
@@ -89,7 +89,7 @@ class MediumLevelILLabel(object):
self.handle = handle
-class MediumLevelILOperationAndSize(object):
+class MediumLevelILOperationAndSize:
def __init__(self, operation:MediumLevelILOperation, size:int):
self._operation = operation
self._size = size
@@ -123,7 +123,7 @@ class MediumLevelILOperationAndSize(object):
return self._size
-class MediumLevelILInstruction(object):
+class MediumLevelILInstruction:
"""
``class MediumLevelILInstruction`` Medium Level Intermediate Language Instructions are infinite length tree-based
instructions. Tree-based instructions use infix notation with the left hand operand being the destination operand.
@@ -811,7 +811,7 @@ class MediumLevelILInstruction(object):
return self._operands
-class MediumLevelILExpr(object):
+class MediumLevelILExpr:
"""
``class MediumLevelILExpr`` hold the index of IL Expressions.
@@ -830,7 +830,7 @@ class MediumLevelILExpr(object):
self._index = value
-class MediumLevelILFunction(object):
+class MediumLevelILFunction:
"""
``class MediumLevelILFunction`` contains the list of MediumLevelILExpr objects that make up a function. MediumLevelILExpr
objects can be added to the MediumLevelILFunction by calling :func:`append` and passing the result of the various class
diff --git a/python/metadata.py b/python/metadata.py
index 7392e7a2..1f72f7a4 100644
--- a/python/metadata.py
+++ b/python/metadata.py
@@ -27,7 +27,7 @@ from .enums import MetadataType
MetadataValueType = Union[int, bool, str, bytes, float, list, tuple, dict]
-class Metadata(object):
+class Metadata:
def __init__(self, value:MetadataValueType=None, signed:Optional[bool]=None,
raw:Optional[bool]=None, handle:Optional[core.BNMetadata]=None):
if handle is not None:
diff --git a/python/plugin.py b/python/plugin.py
index ae840ea2..2cbc6d0e 100644
--- a/python/plugin.py
+++ b/python/plugin.py
@@ -34,7 +34,7 @@ from . import lowlevelil
from . import mediumlevelil
-class PluginCommandContext(object):
+class PluginCommandContext:
def __init__(self, view):
self._view = view
self._address = 0
@@ -580,7 +580,7 @@ class PluginCommand(metaclass=_PluginCommandMetaClass):
self._type = value
-class MainThreadAction(object):
+class MainThreadAction:
def __init__(self, handle):
self.handle = handle
@@ -598,7 +598,7 @@ class MainThreadAction(object):
core.BNWaitForMainThreadAction(self.handle)
-class MainThreadActionHandler(object):
+class MainThreadActionHandler:
_main_thread = None
def __init__(self):
diff --git a/python/pluginmanager.py b/python/pluginmanager.py
index 114ba213..aa68a4f3 100644
--- a/python/pluginmanager.py
+++ b/python/pluginmanager.py
@@ -28,7 +28,7 @@ from . import _binaryninjacore as core
from .enums import PluginType
-class RepoPlugin(object):
+class RepoPlugin:
"""
``RepoPlugin`` is mostly read-only, however you can install/uninstall enable/disable plugins. RepoPlugins are
created by parsing the plugins.json in a plugin repository.
@@ -255,7 +255,7 @@ class RepoPlugin(object):
"""Returns a datetime object representing the plugins last update"""
return datetime.fromtimestamp(core.BNPluginGetLastUpdate(self.handle))
-class Repository(object):
+class Repository:
"""
``Repository`` is a read-only class. Use RepositoryManager to Enable/Disable/Install/Uninstall plugins.
"""
@@ -303,7 +303,7 @@ class Repository(object):
return pluginlist
-class RepositoryManager(object):
+class RepositoryManager:
"""
``RepositoryManager`` Keeps track of all the repositories and keeps the enabled_plugins.json file coherent with
the plugins that are installed/uninstalled enabled/disabled
diff --git a/python/scriptingprovider.py b/python/scriptingprovider.py
index 793ff4e0..79b8bb87 100644
--- a/python/scriptingprovider.py
+++ b/python/scriptingprovider.py
@@ -44,7 +44,7 @@ from .pluginmanager import RepositoryManager
from .enums import ScriptingProviderExecuteResult, ScriptingProviderInputReadyState
-class _ThreadActionContext(object):
+class _ThreadActionContext:
_actions = []
def __init__(self, func):
@@ -67,7 +67,7 @@ class _ThreadActionContext(object):
self.__class__._actions.remove(self)
-class ScriptingOutputListener(object):
+class ScriptingOutputListener:
def _register(self, handle):
self._cb = core.BNScriptingOutputListener()
self._cb.context = 0
@@ -107,7 +107,7 @@ class ScriptingOutputListener(object):
pass
-class ScriptingInstance(object):
+class ScriptingInstance:
def __init__(self, provider, handle = None):
if handle is None:
self._cb = core.BNScriptingInstanceCallbacks()
@@ -378,7 +378,7 @@ class ScriptingProvider(metaclass=_ScriptingProviderMetaclass):
return False
-class _PythonScriptingInstanceOutput(object):
+class _PythonScriptingInstanceOutput:
def __init__(self, orig, is_error):
self.orig = orig
self.is_error = is_error
@@ -460,7 +460,7 @@ class _PythonScriptingInstanceOutput(object):
PythonScriptingInstance._interpreter.value = interpreter
-class _PythonScriptingInstanceInput(object):
+class _PythonScriptingInstanceInput:
def __init__(self, orig):
self.orig = orig
diff --git a/python/settings.py b/python/settings.py
index ac968d3e..b508e863 100644
--- a/python/settings.py
+++ b/python/settings.py
@@ -25,7 +25,7 @@ from . import _binaryninjacore as core
from .enums import SettingsScope
-class Settings(object):
+class Settings:
"""
:class:`Settings` provides a way to define and access settings in a hierarchical fashion. The value of a setting can \
be defined for each hierarchical level, where each level overrides the preceding level. The backing-store for setting \
diff --git a/python/transform.py b/python/transform.py
index 7052b3b1..7c5a45ad 100644
--- a/python/transform.py
+++ b/python/transform.py
@@ -50,7 +50,7 @@ class _TransformMetaClass(type):
return Transform(xform)
-class TransformParameter(object):
+class TransformParameter:
def __init__(self, name, long_name = None, fixed_length = 0):
self._name = name
if long_name is None:
diff --git a/python/typelibrary.py b/python/typelibrary.py
index 2a1a5bab..3dc3dbfa 100644
--- a/python/typelibrary.py
+++ b/python/typelibrary.py
@@ -30,7 +30,7 @@ from . import platform
from . import architecture
-class TypeLibrary(object):
+class TypeLibrary:
def __init__(self, handle):
self.handle = core.handle_of_type(handle, core.BNTypeLibrary)
diff --git a/python/types.py b/python/types.py
index a44be854..0e5f7562 100644
--- a/python/types.py
+++ b/python/types.py
@@ -34,7 +34,7 @@ from . import log
QualifiedNameType = Union[List[str], str, 'QualifiedName', List[bytes]]
-class QualifiedName(object):
+class QualifiedName:
def __init__(self, name:QualifiedNameType=[]):
self._name:List[str] = []
if isinstance(name, str):
@@ -139,7 +139,7 @@ class QualifiedName(object):
self._name = value
-class TypeReferenceSource(object):
+class TypeReferenceSource:
def __init__(self, name, offset, ref_type):
self._name = name
self._offset = offset
@@ -240,7 +240,7 @@ class NameSpace(QualifiedName):
return NameSpace(result)
-class Symbol(object):
+class Symbol:
"""
Symbols are defined as one of the following types:
@@ -348,7 +348,7 @@ class Symbol(object):
return core.BNIsSymbolAutoDefined(self.handle)
@dataclass(frozen=True)
-class FunctionParameter(object):
+class FunctionParameter:
type:'types.Type'
name:str = ""
location:Optional['variable.VariableNameAndType'] = None
@@ -359,7 +359,7 @@ class FunctionParameter(object):
return "%s %s%s" % (self.type.get_string_before_name(), self.name, self.type.get_string_after_name())
-class Type(object):
+class Type:
"""
``class Type`` allows you to interact with the Binary Ninja type system. Note that the ``repr`` and ``str``
handlers respond differently on type objects.
@@ -974,7 +974,7 @@ class Type(object):
@dataclass(frozen=True)
-class BoolWithConfidence(object):
+class BoolWithConfidence:
value:bool
confidence:int=core.max_confidence
@@ -983,7 +983,7 @@ class BoolWithConfidence(object):
@dataclass(frozen=True)
-class SizeWithConfidence(object):
+class SizeWithConfidence:
value:int
confidence:int=core.max_confidence
@@ -992,7 +992,7 @@ class SizeWithConfidence(object):
@dataclass(frozen=True)
-class RegisterStackAdjustmentWithConfidence(object):
+class RegisterStackAdjustmentWithConfidence:
value:int
confidence:int=core.max_confidence
@@ -1001,7 +1001,7 @@ class RegisterStackAdjustmentWithConfidence(object):
@dataclass(frozen=True)
-class RegisterSet(object):
+class RegisterSet:
regs:List['architecture.RegisterName']
confidence:int=core.max_confidence
@@ -1019,7 +1019,7 @@ class RegisterSet(object):
return RegisterSet(list(self.regs), confidence=confidence)
-class NamedTypeReference(object):
+class NamedTypeReference:
def __init__(self, type_class = NamedTypeReferenceClass.UnknownNamedTypeClass, type_id = None, name = None, handle = None):
if handle is None:
if name is not None:
@@ -1084,7 +1084,7 @@ class NamedTypeReference(object):
@dataclass(frozen=True)
-class StructureMember(object):
+class StructureMember:
type:'types.Type'
name:str
offset:int
@@ -1095,7 +1095,7 @@ class StructureMember(object):
return f"<{self.type.get_string_before_name()} {self.name}{self.type.get_string_after_name()}" + \
", offset {self.offset:#x}>"
-class Structure(object):
+class Structure:
def __init__(self, handle=None):
if handle is None:
_handle = core.BNCreateStructureBuilder()
@@ -1292,7 +1292,7 @@ class Structure(object):
@dataclass(frozen=True)
-class EnumerationMember(object):
+class EnumerationMember:
name:str
value:int
default:bool
@@ -1301,7 +1301,7 @@ class EnumerationMember(object):
return f"<{self.name} = {self.value:#x}>"
-class Enumeration(object):
+class Enumeration:
def __init__(self, handle=None):
if handle is None:
_handle = core.BNCreateEnumerationBuilder()
@@ -1386,7 +1386,7 @@ class Enumeration(object):
@dataclass(frozen=True)
-class TypeParserResult(object):
+class TypeParserResult:
types:Mapping[QualifiedName, Type]
variables:Mapping[QualifiedName, Type]
functions:Mapping[QualifiedName, Type]
@@ -1453,7 +1453,7 @@ def preprocess_source(source, filename=None, include_dirs=[]):
@dataclass(frozen=True)
-class TypeFieldReference(object):
+class TypeFieldReference:
func:Optional['function.Function']
arch:Optional['architecture.Architecture']
address:int
diff --git a/python/update.py b/python/update.py
index 8d4611d6..5f3b55df 100644
--- a/python/update.py
+++ b/python/update.py
@@ -67,7 +67,7 @@ class _UpdateChannelMetaClass(type):
return result
-class UpdateProgressCallback(object):
+class UpdateProgressCallback:
def __init__(self, func):
self.cb = ctypes.CFUNCTYPE(ctypes.c_bool, ctypes.c_void_p, ctypes.c_ulonglong, ctypes.c_ulonglong)(self.callback)
self.func = func
@@ -188,7 +188,7 @@ class UpdateChannel(metaclass=_UpdateChannelMetaClass):
self._latest_version_num = value
-class UpdateVersion(object):
+class UpdateVersion:
def __init__(self, channel, ver, notes, t):
self._channel = channel
self._version = ver
diff --git a/python/variable.py b/python/variable.py
index 1e496797..d4148446 100644
--- a/python/variable.py
+++ b/python/variable.py
@@ -29,7 +29,7 @@ from . import decorators
from .enums import RegisterValueType, VariableSourceType, DeadStoreElimination
@dataclass(frozen=True)
-class LookupTableEntry(object):
+class LookupTableEntry:
from_values:List[int]
to_value:int
@@ -181,7 +181,7 @@ class ExternalPointerRegisterValue(RegisterValue):
@dataclass(frozen=True)
-class ValueRange(object):
+class ValueRange:
start:int
end:int
step:int
@@ -198,7 +198,7 @@ class ValueRange(object):
@decorators.passive
-class PossibleValueSet(object):
+class PossibleValueSet:
"""
`class PossibleValueSet` PossibleValueSet is used to define possible values
that a variable can take. It contains methods to instantiate different
@@ -553,7 +553,7 @@ class PossibleValueSet(object):
@dataclass(frozen=True)
-class StackVariableReference(object):
+class StackVariableReference:
_source_operand:Optional[int]
type:'binaryninja.types.Type'
name:str
@@ -743,7 +743,7 @@ class Variable:
return self._var.to_BNVariable()
@dataclass(frozen=True)
-class ConstantReference(object):
+class ConstantReference:
value:int
size:int
pointer:bool
@@ -758,7 +758,7 @@ class ConstantReference(object):
@dataclass(frozen=True)
-class IndirectBranchInfo(object):
+class IndirectBranchInfo:
source_arch:'binaryninja.architecture.Architecture'
source_addr:int
dest_arch:'binaryninja.architecture.Architecture'
@@ -770,7 +770,7 @@ class IndirectBranchInfo(object):
@decorators.passive
-class ParameterVariables(object):
+class ParameterVariables:
def __init__(self, var_list:List[Variable], confidence:int=core.max_confidence, func:Optional['binaryninja.function.Function']=None):
self._vars = var_list
self._confidence = confidence
@@ -811,7 +811,7 @@ class ParameterVariables(object):
@dataclass(frozen=True, order=True)
-class AddressRange(object):
+class AddressRange:
start:int
end:int