Skip to content

Commit

Permalink
Fix Windbg byte-order
Browse files Browse the repository at this point in the history
Fix #105
  • Loading branch information
zachriggle committed Sep 13, 2016
1 parent 3460f88 commit ced1734
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pwndbg/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class _ParsedCommandPrefix(_ParsedCommand):
def __init__(self, function, inc=True, prefix=True):
super(_ParsedCommand, self).__init__(function, inc, prefix)

def fix(arg, sloppy=False, quiet=False):
def fix(arg, sloppy=False, quiet=True):
if isinstance(arg, gdb.Value):
return arg

Expand Down
4 changes: 4 additions & 0 deletions pwndbg/commands/windbg.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ def eX(size, address, data, hex=True):
data = codecs.decode(bytestr, 'hex')
else:
data = bytestr

if pwndbg.arch.endian == 'little':
data = data[::-1]

pwndbg.memory.write(address + (i * size), data)

@pwndbg.commands.ParsedCommand
Expand Down

0 comments on commit ced1734

Please sign in to comment.