| # This script is useful for taking the output of memdump() and |
| # converting it back into binary output. This can be useful, for |
| # example, when one wants to push that data into other tools like |
| # (C) Copyright 2010 Kevin O'Connor <kevin@koconnor.net> |
| # This file may be distributed under the terms of the GNU GPLv3 license. |
| mem.extend([unhex(v) for v in parts]) |
| sys.stderr.write("Usage:\n %s <file | ->\n" |
| filehdl = open(filename, 'r') |
| if (sys.version_info > (3, 0)): |
| sys.stdout.buffer.write(struct.pack("<I", i)) |
| sys.stdout.write(struct.pack("<I", i)) |
| if __name__ == '__main__': |