Created
May 16, 2014 04:37
-
-
Save anantshri/0e67136831c3e43f65f1 to your computer and use it in GitHub Desktop.
Heartbleed pacemaker patch for ascii only output
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
29c29 | |
< MAX_PLAIN_LENGTH = 0x4000 | |
--- | |
> MAX_PLAIN_LENGTH = 0xffff | |
114,116c114,116 | |
< | |
< for i in range(0, len(data), 16): | |
< line = data[i:i+16] | |
--- | |
> repout = "" | |
> for i in range(0, len(data), 80): | |
> line = data[i:i+80] | |
124,126c124,125 | |
< print("{0:04x}: {1:47} {2}".format(i, | |
< ' '.join('{0:02x}'.format(c) for c in line), | |
< ''.join(chr(c) if c >= 32 and c < 127 else '.' for c in line))) | |
--- | |
> repout= repout + ((''.join(chr(c) if c >= 32 and c < 127 else '' for c in line))) | |
> return repout | |
337c336,338 | |
< hexdump(memory) | |
--- | |
> outp = hexdump(memory) | |
> #print type(outp) | |
> print outp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment