Created
December 19, 2012 07:12
-
-
Save 0xc010d/4335013 to your computer and use it in GitHub Desktop.
Hopper's 'Rewrite with NOPs' script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code = 0x90 | |
doc = Document.getCurrentDocument() | |
seg = doc.getCurrentSegment() | |
addr = doc.getCurrentAddress() | |
instr = seg.getInstructionAtAddress(addr) | |
last = addr + instr.getInstructionLength() | |
while addr < last: | |
seg.writeByte(addr, code) | |
seg.markAsCode(addr) | |
addr = addr + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment