Fix typos

Typos found with codespell.
pull/989/head
Samanta Navarro 4 years ago committed by Disconnect3d
parent 2616e7085c
commit 38c38aacfa

@ -107,7 +107,7 @@ Be warned, the first call to radare2/r2ghidra-dec is rather slow! Subsequent req
source will be faster. And it does take up some resources as the radare2 instance is kept by r2pipe
to enable faster subsequent analysis.
With those performance penalties it is resonable to not have it launch always. Therefore it includes
With those performance penalties it is reasonable to not have it launch always. Therefore it includes
an option to only start it when required with `set context-ghidra`:
* `set context-ghidra always`: always trigger the ghidra context
* `set context-ghidra never`: never trigger the ghidra context except when called manually
@ -234,7 +234,7 @@ Pwndbg makes searching the target memory space easy, with a complete and easy-to
## Finding Leaks
![](caps/leakfind.png)
Finding leak chains can be done using the `leakfind` command. It recurisvely inspects address ranges for pointers, and reports on all pointers found.
Finding leak chains can be done using the `leakfind` command. It recursively inspects address ranges for pointers, and reports on all pointers found.
## Telescope

@ -6,7 +6,7 @@ Disassemble near a specified address.
| Positional Argument | Info |
|---------------------|------|
| pc | Address to dissassemble near. |
| pc | Address to disassemble near. |
| lines | Number of lines to show on either side of the address. |
| emulate | Whether to emulate instructions to find the next ones or just linearly disassemble. (default: False) |

@ -8,7 +8,7 @@ Pointer scan for possible offset leaks. Examples: probeleak $rsp 0x64 - leaks 0x
|---------------------|------|
| address | Leak memory address (default: $sp) |
| count | Leak size in bytes (default: 64) |
| max_distance | Max acceptable distance between memory page boundry and leaked pointer (default: 0) |
| max_distance | Max acceptable distance between memory page boundary and leaked pointer (default: 0) |
| Optional Argument | Info |
|---------------------|------|

@ -201,7 +201,7 @@ def walk_stack2(offset=0):
while p.dereference() != 0 or (p+1).dereference() != 0:
p -= 2
# Now we want to continue until we fine, at a minumum, AT_BASE.
# Now we want to continue until we fine, at a minimum, AT_BASE.
# While there's no guarantee that this exists, I've not ever found
# an instance when it doesn't.
#

@ -362,7 +362,7 @@ def AddressExpr(s):
def HexOrAddressExpr(s):
"""
Parses string as hexidecimal int or an address expression. Returns an int.
Parses string as hexadecimal int or an address expression. Returns an int.
(e.g. '1234' will return 0x1234)
"""
try:

@ -119,7 +119,7 @@ class CallOutput:
def output(section):
"""Creates a context manager corresponding to configured context ouput"""
"""Creates a context manager corresponding to configured context output"""
target = outputs.get(section, str(config_output))
if not target or target == "stdout":
return StdOutput()

@ -88,7 +88,7 @@ def leakfind(address=None, page_name=None, max_offset=0x40, max_depth=0x4, step=
negative_offset = int(negative_offset)
# The below map stores a map of child address->(parent_address,parent_start_address)
# In the above tuple, parent_address is the exact address with a pointer to the child adddress.
# In the above tuple, parent_address is the exact address with a pointer to the child address.
# parent_start_address is an address that a previous address pointed to.
# We need to store both so that we can nicely create our leak chain.
visited_map = {}

@ -34,7 +34,7 @@ nearpc_lines = pwndbg.config.Parameter('nearpc-lines', 10, 'number of additional
show_args = pwndbg.config.Parameter('nearpc-show-args', True, 'show call arguments below instruction')
parser = argparse.ArgumentParser(description='''Disassemble near a specified address.''')
parser.add_argument("pc", type=int, nargs="?", default=None, help="Address to dissassemble near.")
parser.add_argument("pc", type=int, nargs="?", default=None, help="Address to disassemble near.")
parser.add_argument("lines", type=int, nargs="?", default=None, help="Number of lines to show on either side of the address.")
#parser.add_argument("to_string", type=bool, nargs="?", default=False, help="Whether to print it or not.") #TODO make sure this should not be exposed
parser.add_argument("emulate", type=bool, nargs="?", default=False, help="Whether to emulate instructions to find the next ones or just linearly disassemble.")

@ -53,7 +53,7 @@ parser.add_argument('address', nargs='?', default='$sp',
parser.add_argument('count', nargs='?', default=0x40,
help='Leak size in bytes')
parser.add_argument('--max-distance', type=int, default=0x0,
help='Max acceptable distance between memory page boundry and leaked pointer')
help='Max acceptable distance between memory page boundary and leaked pointer')
parser.add_argument('--point-to', type=str, default=None,
help='Mapping name of the page that you want the pointers point to')
parser.add_argument('--max-ptrs', type=int, default=0,
@ -74,7 +74,7 @@ def probeleak(address=None, count=0x40, max_distance=0x0, point_to=None, max_ptr
require_flags = flags_str2int(flags)
if count > address > 0x10000: # in case someone puts in an end address and not a count (smh)
print(message.warn("Warning: you gave an end address, not a count. Substracting 0x%x from the count." % (address)))
print(message.warn("Warning: you gave an end address, not a count. Subtracting 0x%x from the count." % (address)))
count -= address
try:

@ -122,7 +122,7 @@ def vmmap_load(filename):
# TODO: Add an argument to let use to choose loading the page information from sections or segments
# Use section information to recover the segment information.
# The entry point of bare metal enviroment is often at the first segment.
# The entry point of bare metal environment is often at the first segment.
# For example, assume the entry point is at 0x8000.
# In most of case, link will create a segment and starts from 0x0.
# This cause all values less than 0x8000 be considered as a valid pointer.

@ -24,7 +24,7 @@ def print_line(name, addr, first, second, op, width = 20):
def xinfo_stack(page, addr):
# If it's a stack address, print offsets to top and bottom of stack, as
# well as offsets to current stack and base pointer (if used by debugee)
# well as offsets to current stack and base pointer (if used by debuggee)
sp = pwndbg.regs.sp
frame = pwndbg.regs[pwndbg.regs.frame]

@ -242,7 +242,7 @@ def get_ehdr(pointer):
vmmap = pwndbg.vmmap.find(pointer)
base = None
# We first check if the begining of the page contains the ELF magic
# We first check if the beginning of the page contains the ELF magic
if pwndbg.memory.read(vmmap.start, 4) == b'\x7fELF':
base = vmmap.start

@ -67,7 +67,7 @@ gdb.events.start = StartEvent()
class EventWrapper:
"""
Wraper for GDB events which may not exist on older GDB versions but we still can
Wrapper for GDB events which may not exist on older GDB versions but we still can
fire them manually (to invoke them you have to call `invoke_callbacks`).
"""
def __init__(self, name):

@ -15,7 +15,7 @@ def decompile(func=None):
If no function is given, decompile the function within the current pc.
This function requires radare2, r2pipe and r2ghidra.
Raises Exception if any fatal error occures.
Raises Exception if any fatal error occurs.
"""
try:
r2 = pwndbg.radare2.r2pipe()

@ -53,7 +53,7 @@ class memoize:
self.cache[args] = value
if isinstance(value, list):
print("Shouldnt cache mutable types! %r" % self.func.__name__)
print("Should not cache mutable types! %r" % self.func.__name__)
if debug:
print("%s: %s(%r)" % (how, self, args))

@ -45,9 +45,9 @@ def get():
pages.extend(monitor_info_mem())
if not pages:
# If debugee is launched from a symlink the debugee memory maps will be
# If debuggee is launched from a symlink the debuggee memory maps will be
# labeled with symlink path while in normal scenario the /proc/pid/maps
# labels debugee memory maps with real path (after symlinks).
# labels debuggee memory maps with real path (after symlinks).
# This is because the exe path in AUXV (and so `info auxv`) is before
# following links.
pages.extend(info_auxv())

@ -16,7 +16,7 @@ def _extract_jumps(line):
NOTE: Because of that we DO NOT display entries that are not writeable (due to FULL RELRO)
as they have `R_X86_64_GLOB_DAT` type.
It might be good to display them seperately in the future.
It might be good to display them separately in the future.
'''
try:
if "JUMP" in line.split()[2]:

@ -92,7 +92,7 @@ if linux; then
exit 1
;;
"manjaro")
echo "Pwndbg is not avaiable on Manjaro's repositories."
echo "Pwndbg is not available on Manjaro's repositories."
echo "But it can be installed using Arch's AUR community package. See:"
echo " - https://www.archlinux.org/packages/community/any/pwndbg/"
echo " - https://aur.archlinux.org/packages/pwndbg-git/"

@ -207,7 +207,7 @@ def test_windbg_eX_commands(start_binary):
# Seems there is some mismatch between Python 3.x argparse output
expected_in = (
# This version occured locally when tested on Python 3.9.5
# This version occurred locally when tested on Python 3.9.5
(
'usage: XX [-h] address [data ...]\n'
"XX: error: argument address: invalid HexOrAddressExpr value: 'nonexistentsymbol'\n"
@ -267,6 +267,6 @@ def test_windbg_eX_commands(start_binary):
'(Made 1 writes to memory; skipping further writes)\n'
)
# Check if the write actually occured
# Check if the write actually occurred
assert pwndbg.memory.read(stack_last_qword_ea, 8) == b'\xef\xbe\xad\xde\xbe\xba\xfe\xca'

Loading…
Cancel
Save