From 814ccf50314852d12168ad5b8a4a875a86bc6e3d Mon Sep 17 00:00:00 2001 From: Pierre LALET Date: Sun, 23 Dec 2018 19:26:44 +0100 Subject: Fix typos & add codespell --- example/disasm/dis_binary_ir.py | 2 +- example/disasm/dis_binary_ira.py | 2 +- example/disasm/full.py | 2 +- example/expression/access_c.py | 2 +- example/expression/basic_op.py | 2 +- example/expression/export_llvm.py | 4 ++-- example/expression/expr_c.py | 2 +- example/ida/ctype_propagation.py | 6 +++--- example/ida/graph_ir.py | 2 +- example/jitter/arm_sc.py | 8 ++++---- example/jitter/example_types.py | 4 ++-- example/jitter/mips32.py | 2 +- example/jitter/msp430.py | 2 +- example/jitter/run_with_linuxenv.py | 4 ++-- example/symbol_exec/dse_crackme.py | 4 ++-- example/symbol_exec/dse_strategies.py | 6 +++--- example/symbol_exec/single_instr.py | 2 +- 17 files changed, 28 insertions(+), 28 deletions(-) (limited to 'example') diff --git a/example/disasm/dis_binary_ir.py b/example/disasm/dis_binary_ir.py index 6d98d692..197fccfd 100644 --- a/example/disasm/dis_binary_ir.py +++ b/example/disasm/dis_binary_ir.py @@ -21,7 +21,7 @@ asmcfg = mdis.dis_multiblock(addr) # End common section # ##################################### -# Get an IR convertor +# Get an IR converter ir_arch = machine.ir(mdis.loc_db) # Get the IR of the asmcfg diff --git a/example/disasm/dis_binary_ira.py b/example/disasm/dis_binary_ira.py index c1bd5dc0..726f353e 100644 --- a/example/disasm/dis_binary_ira.py +++ b/example/disasm/dis_binary_ira.py @@ -21,7 +21,7 @@ asmcfg = mdis.dis_multiblock(addr) # End common section # ##################################### -# Get an IRA convertor +# Get an IRA converter # The sub call are modelised by default operators # call_func_ret and call_func_stack ir_arch_analysis = machine.ira(mdis.loc_db) diff --git a/example/disasm/full.py b/example/disasm/full.py index 03094a55..7f4d4945 100644 --- a/example/disasm/full.py +++ b/example/disasm/full.py @@ -282,7 +282,7 @@ if args.propagexpr: return set(out.values()) - # Add dummy dependecy to uncover out regs affectation + # Add dummy dependency to uncover out regs affectation for loc in ircfg_a.leaves(): irblock = ircfg_a.blocks.get(loc) if irblock is None: diff --git a/example/expression/access_c.py b/example/expression/access_c.py index e8d5e318..b23ba81b 100644 --- a/example/expression/access_c.py +++ b/example/expression/access_c.py @@ -114,7 +114,7 @@ class MyCHandler(CHandler): data = open(sys.argv[1]).read() -# Digest C informations +# Digest C information text = """ struct human { unsigned short age; diff --git a/example/expression/basic_op.py b/example/expression/basic_op.py index a9ed00e3..6032f483 100644 --- a/example/expression/basic_op.py +++ b/example/expression/basic_op.py @@ -15,7 +15,7 @@ c = ExprOp('+', a, b) print c # (eax + ebx) -# + automaticaly generates ExprOp('+', a, b) +# + automatically generates ExprOp('+', a, b) c = a + b print c # (eax + ebx) diff --git a/example/expression/export_llvm.py b/example/expression/export_llvm.py index 6f4ed591..a0af66b7 100644 --- a/example/expression/export_llvm.py +++ b/example/expression/export_llvm.py @@ -21,7 +21,7 @@ ircfg = ir.new_ircfg_from_asmcfg(asmcfg) ircfg.simplify(expr_simp_high_to_explicit) ###################################################### -# Instanciate a context and the function to fill +# Instantiate a context and the function to fill context = LLVMContext_IRCompilation() context.ir_arch = ir @@ -31,7 +31,7 @@ func.init_fc() # Here, as an example, we arbitrarily represent registers with global # variables. Locals allocas are used for the computation during the function, -# and is finally saved in the aforementionned global variable. +# and is finally saved in the aforementioned global variable. # In other words, for each registers: # entry: diff --git a/example/expression/expr_c.py b/example/expression/expr_c.py index ca92153a..e0825799 100644 --- a/example/expression/expr_c.py +++ b/example/expression/expr_c.py @@ -14,7 +14,7 @@ from miasm2.expression.expression import ExprId C manipulation example """ -# Digest C informations +# Digest C information text = """ struct line { char color[20]; diff --git a/example/ida/ctype_propagation.py b/example/ida/ctype_propagation.py index 6a655fa8..1c883214 100644 --- a/example/ida/ctype_propagation.py +++ b/example/ida/ctype_propagation.py @@ -50,9 +50,9 @@ Analysis scope: <##Header file :{headerFile}> -{cTypeFile}> -<##Types informations :{typeFile}> - +{cTypeFile}> +<##Types information :{typeFile}> + {cUnalias}> """, { diff --git a/example/ida/graph_ir.py b/example/ida/graph_ir.py index bc135ee2..b204b2b8 100644 --- a/example/ida/graph_ir.py +++ b/example/ida/graph_ir.py @@ -204,7 +204,7 @@ def build_graph(verbose=False, simplify=False, ssa=False, ssa_simplify=False): out[reg] = dst return set(out.values()) - # Add dummy dependecy to uncover out regs affectation + # Add dummy dependency to uncover out regs affectation for loc in ircfg.leaves(): irblock = ircfg.blocks.get(loc) if irblock is None: diff --git a/example/jitter/arm_sc.py b/example/jitter/arm_sc.py index 6644a440..7720ad68 100755 --- a/example/jitter/arm_sc.py +++ b/example/jitter/arm_sc.py @@ -9,18 +9,18 @@ from pdb import pm parser = Sandbox_Linux_arml_str.parser(description="""Sandbox an elf binary with arm engine (ex: jit_arm_sc.py example/demo_arm_l.bin)""") parser.add_argument("filename", help="string Filename") -parser.add_argument("endianess", help="endianness [b/l]") +parser.add_argument("endianness", help="endianness [b/l]") parser.add_argument('-v', "--verbose", help="verbose mode", action="store_true") options = parser.parse_args() -if options.endianess == 'b': +if options.endianness == 'b': sandbox = Sandbox_Linux_armb_str -elif options.endianess == 'l': +elif options.endianness == 'l': sandbox = Sandbox_Linux_arml_str else: - raise ValueError("Bad endianess!") + raise ValueError("Bad endianness!") sb = sandbox(options.filename, options, globals()) diff --git a/example/jitter/example_types.py b/example/jitter/example_types.py index 7ed964c2..bcf9bf70 100755 --- a/example/jitter/example_types.py +++ b/example/jitter/example_types.py @@ -10,7 +10,7 @@ from miasm2.core.types import MemStruct, Self, Void, Str, Array, Ptr, \ Num, Array, set_allocator from miasm2.os_dep.common import heap -# Instanciate a heap +# Instantiate a heap my_heap = heap() # And set it as the default memory allocator, to avoid manual allocation and # explicit address passing to the MemType subclasses (like MemStruct) @@ -129,7 +129,7 @@ class DataArray(MemStruct): fields = [ ("val1", Num("B")), ("val2", Num("B")), - # Ptr can also be instanciated with a Type instance as an argument, the + # Ptr can also be instantiated with a Type instance as an argument, the # corresponding Memtype will be returned when dereferencing # Here, data_array.array.deref will allow to access an Array ("arrayptr", Ptr("