diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2019-01-03 15:33:39 -0500 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2019-01-03 15:33:39 -0500 |
| commit | 34b04f487e0dfcdc8766cb265e10dd3f58217f30 (patch) | |
| tree | 6ccc49becfb5802bf982c9dc9978631283bc6c57 | |
| parent | ac204fce33045803f27b438a2ffd3930d96fc52b (diff) | |
lots of spelling / typo fixes
| -rw-r--r-- | python/__init__.py | 4 | ||||
| -rw-r--r-- | python/architecture.py | 8 | ||||
| -rw-r--r-- | python/basicblock.py | 2 | ||||
| -rw-r--r-- | python/binaryview.py | 10 | ||||
| -rw-r--r-- | python/datarender.py | 12 | ||||
| -rw-r--r-- | python/demangle.py | 2 | ||||
| -rw-r--r-- | python/interaction.py | 58 | ||||
| -rw-r--r-- | python/log.py | 4 | ||||
| -rw-r--r-- | python/lowlevelil.py | 8 | ||||
| -rw-r--r-- | python/mediumlevelil.py | 4 | ||||
| -rw-r--r-- | python/platform.py | 2 | ||||
| -rw-r--r-- | python/pluginmanager.py | 10 | ||||
| -rw-r--r-- | python/settings.py | 4 | ||||
| -rw-r--r-- | python/types.py | 6 | ||||
| -rw-r--r-- | python/update.py | 2 |
15 files changed, 68 insertions, 68 deletions
diff --git a/python/__init__.py b/python/__init__.py index 6e30520b..6f705b07 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -164,7 +164,7 @@ _plugin_api_name = "python2" class PluginManagerLoadPluginCallback(object): - """Callback for BNLoadPluginForApi("python2", ...), dynamicly loads python plugins.""" + """Callback for BNLoadPluginForApi("python2", ...), dynamically loads python plugins.""" def __init__(self): self.cb = ctypes.CFUNCTYPE( ctypes.c_bool, @@ -178,7 +178,7 @@ class PluginManagerLoadPluginCallback(object): plugin = repo[plugin_path] if plugin.api != _plugin_api_name: - raise ValueError("Plugin api name is not " + _plugin_api_name) + raise ValueError("Plugin API name is not " + _plugin_api_name) if not plugin.installed: plugin.installed = True diff --git a/python/architecture.py b/python/architecture.py index b12b35a1..2d6dec15 100644 --- a/python/architecture.py +++ b/python/architecture.py @@ -1192,7 +1192,7 @@ class Architecture(with_metaclass(_ArchitectureMetaClass, object)): :param str data: bytes to decode :param int addr: virtual address of the byte to be decoded - :return: a :py:class:`InstructionInfo` object containing the length and branche types for the given instruction + :return: a :py:class:`InstructionInfo` object containing the length and branch types for the given instruction :rtype: InstructionInfo """ raise NotImplementedError @@ -1412,7 +1412,7 @@ class Architecture(with_metaclass(_ArchitectureMetaClass, object)): .. note:: Architecture subclasses should implement this method. .. note :: The instruction info object should always set the InstructionInfo.length to the instruction length, \ - and the branches of the proper types shoulde be added if the instruction is a branch. + and the branches of the proper types should be added if the instruction is a branch. If the instruction is a branch instruction architecture plugins should add a branch of the proper type: @@ -1635,7 +1635,7 @@ class Architecture(with_metaclass(_ArchitectureMetaClass, object)): def get_flag_write_type_by_name(self, write_type): """ - ``get_flag_write_type_by_name`` gets the flag write type name for the flage write type. + ``get_flag_write_type_by_name`` gets the flag write type name for the flag write type. :param int write_type: flag write type :return: flag write type @@ -2273,7 +2273,7 @@ class CoreArchitecture(Architecture): ``addr`` with data ``data``. .. note :: The instruction info object should always set the InstructionInfo.length to the instruction length, \ - and the branches of the proper types shoulde be added if the instruction is a branch. + and the branches of the proper types should be added if the instruction is a branch. :param str data: max_instruction_length bytes from the binary at virtual address ``addr`` :param int addr: virtual address of bytes in ``data`` diff --git a/python/basicblock.py b/python/basicblock.py index d68189ab..b38a9f08 100644 --- a/python/basicblock.py +++ b/python/basicblock.py @@ -76,7 +76,7 @@ class BasicBlock(object): return ctypes.addressof(self.handle.contents) != ctypes.addressof(value.handle.contents) def _create_instance(self, view, handle): - """Internal method used to instantiante child instances""" + """Internal method used to instantiate child instances""" return BasicBlock(view, handle) def __hash__(self): diff --git a/python/binaryview.py b/python/binaryview.py index 51b7da6c..f168c803 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -1744,7 +1744,7 @@ class BinaryView(object): """ ``perform_get_entry_point`` implements a query for the initial entry point for code execution. - .. note:: This method **should** be implmented for custom BinaryViews that are executable. + .. note:: This method **should** be implemented for custom BinaryViews that are executable. .. warning:: This method **must not** be called directly. :return: the virtual address of the entry point @@ -2843,7 +2843,7 @@ class BinaryView(object): .. note:: This API performs a binary patch, analysis may need to be updated afterward. Additionally the binary\ file must be saved in order to preserve the changes made. - :param int addr: virtual address of the instruction to conver to nops + :param int addr: virtual address of the instruction to convert to nops :param Architecture arch: (optional) the architecture of the instructions if different from the default :return: True on success, False on failure. :rtype: bool @@ -3339,7 +3339,7 @@ class BinaryView(object): and thus will contain both data views, and disassembly. :param DisassemblySettings settings: instance specifying the desired output formatting. - :return: An iterator containing formatted dissassembly lines. + :return: An iterator containing formatted disassembly lines. :rtype: LinearDisassemblyIterator :Example: @@ -3459,7 +3459,7 @@ class BinaryView(object): def get_type_id(self, name): """ - ``get_type_id`` returns the unique indentifier of the defined type whose name corresponds with the + ``get_type_id`` returns the unique identifier of the defined type whose name corresponds with the provided ``name`` :param QualifiedName name: Type name to lookup @@ -3861,7 +3861,7 @@ class BinaryView(object): - 0 - Octal - In the case of an ambiguous number/symbol (one with no prefix) for instance `12345` we will first attempt to look up the string as a symbol, if a symbol is found its address is used, otherwise we attempt to convert - it to a hexadecmial number. + it to a hexadecimal number. - The following operations are valid: +, -, *, /, %, (), &, |, ^, ~ - In addition to the above operators there are _il-style_ dereference operators - [<expression>] - read the _current address size_ at <expression> diff --git a/python/datarender.py b/python/datarender.py index c0a1dd3b..8b349fe1 100644 --- a/python/datarender.py +++ b/python/datarender.py @@ -34,18 +34,18 @@ from binaryninja import highlight class DataRenderer(object): """ - DataRender objects tell the Linear View how to render specific types. + DataRenderer objects tell the Linear View how to render specific types. - The `perform_is_valid_for_data` method returns a boolean to indicate if your derrived class + The `perform_is_valid_for_data` method returns a boolean to indicate if your derived class is able to render the type, given the `addr` and `context`. The `context` is a list of Type objects which represents the chain of nested objects that is being displayed. The `perform_get_lines_for_data` method returns a list of `DisassemblyTextLine` objects each one representing a single line of Linear View output. The `prefix` variable is a list of `InstructionTextToken`'s - which have already been generated by other `DataRender`'s. + which have already been generated by other `DataRenderer`'s. After defining the `DataRenderer` subclass you must then register it with the core. This is done by calling - either `register_type_sepcific` or `register_generic`. A "generic" type renderer is able to be overridden by + either `register_type_specific` or `register_generic`. A "generic" type renderer is able to be overridden by a "type specific" renderer. For instance there is a generic struct render which renders any struct that hasn't been explicitly overridden by a "type specific" renderer. @@ -65,7 +65,7 @@ class DataRenderer(object): def __del__(self): pass - BarDataRenderer().register_type_sepcific() + BarDataRenderer().register_type_specific() """ def __init__(self, context=None): self._cb = core.BNCustomDataRenderer() @@ -81,7 +81,7 @@ class DataRenderer(object): and context[0].type_class == TypeClass.NamedTypeReferenceClass and context[0].named_type_reference.name == name) - def register_type_sepcific(self): + def register_type_specific(self): core.BNRegisterTypeSpecificDataRenderer(core.BNGetDataRendererContainer(), self.handle) def register_generic(self): diff --git a/python/demangle.py b/python/demangle.py index 2fa1028f..dd96bee2 100644 --- a/python/demangle.py +++ b/python/demangle.py @@ -31,7 +31,7 @@ from binaryninja import pyNativeStr def get_qualified_name(names): """ - ``get_qualified_name`` gets a qualified name for the provied name list. + ``get_qualified_name`` gets a qualified name for the provided name list. :param list(str) names: name list to qualify :return: a qualified name diff --git a/python/interaction.py b/python/interaction.py index abb21538..d5c1e3e9 100644 --- a/python/interaction.py +++ b/python/interaction.py @@ -86,7 +86,7 @@ class TextLineField(object): class MultilineTextField(object): """ ``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. + as a string. This option is not supported on the command-line. """ def __init__(self, prompt): self.prompt = prompt @@ -127,8 +127,8 @@ class AddressField(object): ``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. - Note: This API currenlty functions differently on the command line, as the view and current_address are - disregarded. Additionally where as in the ui the result defaults to hexidecimal on the command line 0x must be + Note: This API currently functions differently on the command-line, as the view and current_address are + disregarded. Additionally where as in the UI the result defaults to hexadecimal on the command-line 0x must be specified. """ def __init__(self, prompt, view=None, current_address=0): @@ -500,7 +500,7 @@ class PlainTextReport(object): self.contents = contents def __repr__(self): - return "<plain text report: %s>" % self.title + return "<plaintext report: %s>" % self.title def __str__(self): return self.contents @@ -625,13 +625,13 @@ def markdown_to_html(contents): def show_plain_text_report(title, contents): """ - ``show_plain_text_report`` displays contents to the user in the UI or on the command line. + ``show_plain_text_report`` displays contents to the user in the UI or on the command-line. - Note: This API function differently on the command line vs. the UI. In the UI a popup is used. On the commandline + Note: This API function differently on the command-line vs the UI. In the UI a pop-up is used. On the command-line a simple text prompt is used. - :param str title: title to display in the UI popup. - :param str contents: plain text contents to display + :param str title: title to display in the UI pop-up. + :param str contents: plaintext contents to display :rtype: None :Example: >>> show_plain_text_report("title", "contents") @@ -642,15 +642,15 @@ def show_plain_text_report(title, contents): def show_markdown_report(title, contents, plaintext=""): """ - ``show_markdown_report`` displays the markdown contents in UI applications and plaintext in command line + ``show_markdown_report`` displays the markdown contents in UI applications and plaintext in command-line applications. Markdown reports support hyperlinking into the BinaryView. Hyperlinks can be specified as follows: - ``binaryninja://?expr='_start'`` Where ``expr=`` specifies an expression parsable by the `parse_expression` api. + ``binaryninja://?expr='_start'`` Where ``expr=`` specifies an expression parsable by the `parse_expression` API. - Note: This API function differently on the command line vs. the UI. In the UI a popup is used. On the commandline + Note: This API function differently on the command-line vs the UI. In the UI a pop-up is used. On the command-line a simple text prompt is used. :param str contents: markdown contents to display - :param str plaintext: Plain text version to display (used on the command line) + :param str plaintext: Plain text version to display (used on the command-line) :rtype: None :Example: >>> show_markdown_report("title", "##Contents", "Plain text contents") @@ -661,15 +661,15 @@ def show_markdown_report(title, contents, plaintext=""): def show_html_report(title, contents, plaintext=""): """ - ``show_html_report`` displays the html contents in UI applications and plaintext in command line + ``show_html_report`` displays the HTML contents in UI applications and plaintext in command-line applications. HTML reports support hyperlinking into the BinaryView. Hyperlinks can be specified as follows: - ``binaryninja://?expr='_start'`` Where ``expr=`` specifies an expression parsable by the `parse_expression` api. + ``binaryninja://?expr='_start'`` Where ``expr=`` specifies an expression parsable by the `parse_expression` API. - Note: This API function differently on the command line vs. the UI. In the UI a popup is used. On the commandline + Note: This API function differently on the command-line vs the UI. In the UI a pop-up is used. On the command-line a simple text prompt is used. :param str contents: HTML contents to display - :param str plaintext: Plain text version to display (used on the command line) + :param str plaintext: Plain text version to display (used on the command-line) :rtype: None :Example: >>> show_html_report("title", "<h1>Contents</h1>", "Plain text contents") @@ -696,7 +696,7 @@ def show_graph_report(title, graph): def show_report_collection(title, reports): """ - ``show_report_collection`` displays mulitple reports in UI applications. + ``show_report_collection`` displays multiple reports in UI applications. Note: This API function will have no effect outside the UI. @@ -710,7 +710,7 @@ def get_text_line_input(prompt, title): """ ``get_text_line_input`` prompts the user to input a string with the given prompt and title. - Note: This API function differently on the command line vs. the UI. In the UI a popup is used. On the commandline + Note: This API function differently on the command-line vs the UI. In the UI a pop-up is used. On the command-line a simple text prompt is used. :param str prompt: String to prompt with. @@ -733,7 +733,7 @@ def get_int_input(prompt, title): """ ``get_int_input`` prompts the user to input a integer with the given prompt and title. - Note: This API function differently on the command line vs. the UI. In the UI a popup is used. On the commandline + Note: This API function differently on the command-line vs the UI. In the UI a pop-up is used. On the command-line a simple text prompt is used. :param str prompt: String to prompt with. @@ -754,7 +754,7 @@ def get_address_input(prompt, title): """ ``get_address_input`` prompts the user for an address with the given prompt and title. - Note: This API function differently on the command line vs. the UI. In the UI a popup is used. On the commandline + Note: This API function differently on the command-line vs the UI. In the UI a pop-up is used. On the command-line a simple text prompt is used. :param str prompt: String to prompt with. @@ -775,8 +775,8 @@ def get_choice_input(prompt, title, choices): """ ``get_choice_input`` prompts the user to select the one of the provided choices. - Note: This API function differently on the command line vs. the UI. In the UI a popup is used. On the commandline - a simple text prompt is used. The ui uses a combo box. + Note: This API function differently on the command-line vs the UI. In the UI a pop-up is used. On the command-line + a simple text prompt is used. The UI uses a combo box. :param str prompt: String to prompt with. :param str title: Title of the window when executed in the UI. @@ -804,8 +804,8 @@ def get_open_filename_input(prompt, ext=""): """ ``get_open_filename_input`` prompts the user for a file name to open. - Note: This API function differently on the command line vs. the UI. In the UI a popup is used. On the commandline - a simple text prompt is used. The ui uses the native window popup for file selection. + Note: This API function differently on the command-line vs the UI. In the UI a pop-up is used. On the command-line + a simple text prompt is used. The UI uses the native window pop-up for file selection. :param str prompt: Prompt to display. :param str ext: Optional, file extension @@ -827,8 +827,8 @@ def get_save_filename_input(prompt, ext="", default_name=""): ``get_save_filename_input`` prompts the user for a file name to save as, optionally providing a file extension and default_name. - Note: This API function differently on the command line vs. the UI. In the UI a popup is used. On the commandline - a simple text prompt is used. The ui uses the native window popup for file selection. + Note: This API function differently on the command-line vs the UI. In the UI a pop-up is used. On the command-line + a simple text prompt is used. The UI uses the native window pop-up for file selection. :param str prompt: Prompt to display. :param str ext: Optional, file extension @@ -850,7 +850,7 @@ def get_directory_name_input(prompt, default_name=""): """ ``get_directory_name_input`` prompts the user for a directory name to save as, optionally providing a default_name. - Note: This API function differently on the command line vs. the UI. In the UI a popup is used. On the commandline a simple text prompt is used. The ui uses the native window popup for file selection. + Note: This API function differently on the command-line vs the UI. In the UI a pop-up is used. On the command-line a simple text prompt is used. The UI uses the native window pop-up for file selection. :param str prompt: Prompt to display. :param str default_name: Optional, default directory name. @@ -884,9 +884,9 @@ def get_form_input(fields, title): - OpenFileNameField - Prompt for file to open - SaveFileNameField - Prompt for file to save to - DirectoryNameField - Prompt for directory name - This API is flexible and works both in the UI via a popup dialog and on the command line. + This API is flexible and works both in the UI via a pop-up dialog and on the command-line. :params list fields: A list containing of the above specified classes, strings or None - :params str title: The title of the popup dialog. + :params str title: The title of the pop-up dialog. :Example: >>> int_f = IntegerField("Specify Integer") diff --git a/python/log.py b/python/log.py index 4997b222..ab763f44 100644 --- a/python/log.py +++ b/python/log.py @@ -60,7 +60,7 @@ def log(level, text): def log_debug(text): """ - ``log_debug`` Logs debuging information messages to the console. + ``log_debug`` Logs debugging information messages to the console. :param str text: message to print :rtype: None @@ -165,7 +165,7 @@ def log_to_stderr(min_level): def log_to_file(min_level, path, append = False): """ - ``log_to_file`` redirects minimum log level to a file named ``path``, optionally appending rather than overwritting. + ``log_to_file`` redirects minimum log level to a file named ``path``, optionally appending rather than overwriting. :param int min_level: minimum level to log to :param str path: path to log to diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 2a8ba5d0..3855c2d0 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -925,7 +925,7 @@ class LowLevelILFunction(object): :param int size: size of the register parameter in bytes :param str hi: the high register name :param str lo: the low register name - :param LowLevelILExpr value: an expression to set the split regiters to + :param LowLevelILExpr value: an expression to set the split registers to :param str flags: which flags are set by this operation :return: The expression ``hi:lo = value`` :rtype: LowLevelILExpr @@ -1549,7 +1549,7 @@ class LowLevelILFunction(object): ``sign_extend`` two's complement sign-extends the expression in ``value`` to ``size`` bytes :param int size: the size of the result in bytes - :param LowLevelILExpr value: the expression to sign extn + :param LowLevelILExpr value: the expression to sign extend :param str flags: optional, flags to set :return: The expression ``sx.<size>(value)`` :rtype: LowLevelILExpr @@ -1749,7 +1749,7 @@ class LowLevelILFunction(object): def compare_signed_greater_equal(self, size, a, b): """ ``compare_signed_greater_equal`` returns comparison expression of size ``size`` checking if expression ``a`` is - signed greater than or equal toexpression ``b`` + signed greater than or equal to expression ``b`` :param int size: size in bytes :param LowLevelILExpr a: LHS of comparison @@ -2390,7 +2390,7 @@ class LowLevelILBasicBlock(basicblock.BasicBlock): return self.il_function[self.end + idx] def _create_instance(self, view, handle): - """Internal method by super to instantiante child instances""" + """Internal method by super to instantiate child instances""" return LowLevelILBasicBlock(view, handle, self.il_function) def __hash__(self): diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py index 2dae008a..6345038c 100644 --- a/python/mediumlevelil.py +++ b/python/mediumlevelil.py @@ -787,7 +787,7 @@ class MediumLevelILFunction(object): """ ``add_label_list`` returns a label list expression for the given list of MediumLevelILLabel objects. - :param list(MediumLevelILLabel) lables: the list of MediumLevelILLabel to get a label list expression from + :param list(MediumLevelILLabel) labels: the list of MediumLevelILLabel to get a label list expression from :return: the label list expression :rtype: MediumLevelILExpr """ @@ -973,7 +973,7 @@ class MediumLevelILBasicBlock(basicblock.BasicBlock): return self.il_function[self.end + idx] def _create_instance(self, view, handle): - """Internal method by super to instantiante child instances""" + """Internal method by super to instantiate child instances""" return MediumLevelILBasicBlock(view, handle, self.il_function) def __hash__(self): diff --git a/python/platform.py b/python/platform.py index 9a5f70df..02bf2450 100644 --- a/python/platform.py +++ b/python/platform.py @@ -95,7 +95,7 @@ class _PlatformMetaClass(type): class Platform(with_metaclass(_PlatformMetaClass, object)): """ - ``class Platform`` contains all information releated to the execution environment of the binary, mainly the + ``class Platform`` contains all information related to the execution environment of the binary, mainly the calling conventions used. """ name = None diff --git a/python/pluginmanager.py b/python/pluginmanager.py index c7a0c83a..945d410b 100644 --- a/python/pluginmanager.py +++ b/python/pluginmanager.py @@ -74,7 +74,7 @@ class RepoPlugin(object): @property def api(self): - """string indicating the api used by the plugin""" + """string indicating the API used by the plugin""" return core.BNPluginGetApi(self.handle) @property @@ -120,7 +120,7 @@ class RepoPlugin(object): @property def url(self): - """String url of the plugin's git repository""" + """String URL of the plugin's git repository""" return core.BNPluginGetUrl(self.handle) @property @@ -156,7 +156,7 @@ class Repository(object): @property def url(self): - """String url of the git repository where the plugin repository's are stored""" + """String URL of the git repository where the plugin repository's are stored""" return core.BNRepositoryGetUrl(self.handle) @property @@ -200,7 +200,7 @@ class Repository(object): class RepositoryManager(object): """ ``RepositoryManager`` Keeps track of all the repositories and keeps the enabled_plugins.json file coherent with - the plugins that are installed/unstalled enabled/disabled + the plugins that are installed/uninstalled enabled/disabled """ def __init__(self, handle=None): raise Exception("RepositoryManager temporarily disabled!") @@ -376,7 +376,7 @@ class RepositoryManager(object): """ ``add_repository`` adds a new plugin repository for the manager to track. - :param str url: Url to the git repository where the plugins are stored. + :param str url: URL to the git repository where the plugins are stored. :param str repopath: path to where the repository will be stored on disk locally :param str localreference: Optional reference to the local tracking branch typically "master" :param str remotereference: Optional reference to the remote tracking branch typically "origin" diff --git a/python/settings.py b/python/settings.py index 135cd342..9bc4299b 100644 --- a/python/settings.py +++ b/python/settings.py @@ -39,7 +39,7 @@ class Settings(object): :param str group: a unique identifier :param str title: a user friendly name appropriate for UI presentation - :return: True on success, False on falure. + :return: True on success, False on failure. :rtype: bool :Example: @@ -55,7 +55,7 @@ class Settings(object): :param str id: a unique setting identifier in the form <group>.<id> :param str properties: a JSON string describes the setting schema - :return: True on success, False on falure. + :return: True on success, False on failure. :rtype: bool :Example: diff --git a/python/types.py b/python/types.py index e6913f93..ab31030b 100644 --- a/python/types.py +++ b/python/types.py @@ -1030,9 +1030,9 @@ def preprocess_source(source, filename=None, include_dirs=[]): """ ``preprocess_source`` run the C preprocessor on the given source or source filename. - :param str source: source to preprocess - :param str filename: optional filename to preprocess - :param list(str) include_dirs: list of string directorires to use as include directories. + :param str source: source to pre-process + :param str filename: optional filename to pre-process + :param list(str) include_dirs: list of string directories to use as include directories. :return: returns a tuple of (preprocessed_source, error_string) :rtype: tuple(str,str) :Example: diff --git a/python/update.py b/python/update.py index 90128056..9872ad5e 100644 --- a/python/update.py +++ b/python/update.py @@ -224,7 +224,7 @@ def set_auto_updates_enabled(enabled): """ ``set_auto_updates_enabled`` sets auto update enabled status. - :param bool enabled: True to enable update, Flase to disable updates. + :param bool enabled: True to enable update, False to disable updates. :rtype: None """ core.BNSetAutoUpdatesEnabled(enabled) |
