Skip to content

Commit

Permalink
Change windbg commands to parse data as strings. Fix for Gallopsled#672
Browse files Browse the repository at this point in the history
  • Loading branch information
stnevans authored and disconnect3d committed Sep 20, 2019
1 parent 848247e commit 1edf676
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pwndbg/commands/windbg.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def enhex(size, value):

parser = argparse.ArgumentParser(description="Write hex bytes at the specified address.")
parser.add_argument("address", type=int, help="The address to write to.")
parser.add_argument("data", type=int, nargs="*", help="The bytes to write.")
parser.add_argument("data", type=str, nargs="*", help="The bytes to write.")
@pwndbg.commands.ArgparsedCommand(parser)
@pwndbg.commands.OnlyWhenRunning
def eb(address, data):
Expand All @@ -147,7 +147,7 @@ def eb(address, data):

parser = argparse.ArgumentParser(description="Write hex words at the specified address.")
parser.add_argument("address", type=int, help="The address to write to.")
parser.add_argument("data", type=int, nargs="*", help="The words to write.")
parser.add_argument("data", type=str, nargs="*", help="The words to write.")
@pwndbg.commands.ArgparsedCommand(parser)
@pwndbg.commands.OnlyWhenRunning
def ew(address, data):
Expand All @@ -159,7 +159,7 @@ def ew(address, data):

parser = argparse.ArgumentParser(description="Write hex dwords at the specified address.")
parser.add_argument("address", type=int, help="The address to write to.")
parser.add_argument("data", type=int, nargs="*", help="The dwords to write.")
parser.add_argument("data", type=str, nargs="*", help="The dwords to write.")
@pwndbg.commands.ArgparsedCommand(parser)
@pwndbg.commands.OnlyWhenRunning
def ed(address, data):
Expand All @@ -171,7 +171,7 @@ def ed(address, data):

parser = argparse.ArgumentParser(description="Write hex qwords at the specified address.")
parser.add_argument("address", type=int, help="The address to write to.")
parser.add_argument("data", type=int, nargs="*", help="The qwords to write.")
parser.add_argument("data", type=str, nargs="*", help="The qwords to write.")
@pwndbg.commands.ArgparsedCommand(parser)
@pwndbg.commands.OnlyWhenRunning
def eq(address, data):
Expand Down

0 comments on commit 1edf676

Please sign in to comment.