mirror of https://github.com/dirtbags/netarch.git
Make hexdump match the one in fluffy
This commit is contained in:
parent
7305d42800
commit
8994b9b5ca
|
@ -3,59 +3,62 @@
|
|||
import sys
|
||||
import struct
|
||||
|
||||
stdch = (u'␀·········␊··␍··'
|
||||
u'················'
|
||||
u' !"#$%&\'()*+,-./'
|
||||
u'0123456789:;<=>?'
|
||||
u'@ABCDEFGHIJKLMNO'
|
||||
u'PQRSTUVWXYZ[\]^_'
|
||||
u'`abcdefghijklmno'
|
||||
u'pqrstuvwxyz{|}~·'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················')
|
||||
stdch = (
|
||||
'␀·········␊··␍··'
|
||||
'················'
|
||||
' !"#$%&\'()*+,-./'
|
||||
'0123456789:;<=>?'
|
||||
'@ABCDEFGHIJKLMNO'
|
||||
'PQRSTUVWXYZ[\]^_'
|
||||
'`abcdefghijklmno'
|
||||
'pqrstuvwxyz{|}~·'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
)
|
||||
|
||||
decch = (u'␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏'
|
||||
u'␐␑␒␓␔␕␖␗␘␙␚·····'
|
||||
u'␠!"#$%&\'()*+,-./'
|
||||
u'0123456789:;<=>?'
|
||||
u'@ABCDEFGHIJKLMNO'
|
||||
u'PQRSTUVWXYZ[\]^_'
|
||||
u'`abcdefghijklmno'
|
||||
u'pqrstuvwxyz{|}~␡'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················'
|
||||
u'················')
|
||||
|
||||
|
||||
|
||||
cgach = (u'␀☺☻♥♦♣♠•◘○◙♂♀♪♫☼'
|
||||
u'►◄↕‼¶§▬↨↑↓→←∟↔▲▼'
|
||||
u' !"#$%&\'()*+,-./'
|
||||
u'0123456789:;<=>?'
|
||||
u'@ABCDEFGHIJKLMNO'
|
||||
u'PQRSTUVWXYZ[\]^_'
|
||||
u'`abcdefghijklmno'
|
||||
u'pqrstuvwxyz{|}~⌂'
|
||||
u'ÇüéâäàåçêëèïîìÄÅ'
|
||||
u'ÉæÆôöòûùÿÖÜ¢£¥₧ƒ'
|
||||
u'áíóúñѪº¿⌐¬½¼¡«»'
|
||||
u'░▒▓│┤╡╢╖╕╣║╗╝╜╛┐'
|
||||
u'└┴┬├─┼╞╟╚╔╩╦╠═╬╧'
|
||||
u'╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀'
|
||||
u'αßΓπΣσµτΦΘΩδ∞φε∩'
|
||||
u'≡±≥≤⌠⌡÷≈°∙·√ⁿ²■¤')
|
||||
decch = (
|
||||
'␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏'
|
||||
'␐␑␒␓␔␕␖␗␘␙␚·····'
|
||||
'␠!"#$%&\'()*+,-./'
|
||||
'0123456789:;<=>?'
|
||||
'@ABCDEFGHIJKLMNO'
|
||||
'PQRSTUVWXYZ[\]^_'
|
||||
'`abcdefghijklmno'
|
||||
'pqrstuvwxyz{|}~␡'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
'················'
|
||||
)
|
||||
|
||||
cgach = (
|
||||
'□☺☻♥♦♣♠•◘○◙♂♀♪♫☼'
|
||||
'►◄↕‼¶§▬↨↑↓→←∟↔▲▼'
|
||||
' !"#$%&\'()*+,-./'
|
||||
'0123456789:;<=>?'
|
||||
'@ABCDEFGHIJKLMNO'
|
||||
'PQRSTUVWXYZ[\]^_'
|
||||
'`abcdefghijklmno'
|
||||
'pqrstuvwxyz{|}~⌂'
|
||||
'ÇüéâäàåçêëèïîìÄÅ'
|
||||
'ÉæÆôöòûùÿÖÜ¢£¥₧ƒ'
|
||||
'áíóúñѪº¿⌐¬½¼¡«»'
|
||||
'░▒▓│┤╡╢╖╕╣║╗╝╜╛┐'
|
||||
'└┴┬├─┼╞╟╚╔╩╦╠═╬╧'
|
||||
'╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀'
|
||||
'αßΓπΣσµτΦΘΩδ∞φε∩'
|
||||
'≡±≥≤⌠⌡÷≈°∙·√ⁿ²■¤'
|
||||
)
|
||||
|
||||
|
||||
def unpack(fmt, buf):
|
||||
|
@ -94,9 +97,9 @@ class HexDumper:
|
|||
self.output.write(' '.join(self.hexes[:8]))
|
||||
self.output.write(' ')
|
||||
self.output.write(' '.join(self.hexes[8:]))
|
||||
self.output.write(' |')
|
||||
self.output.write(' ┆')
|
||||
self.output.write(''.join(self.chars))
|
||||
self.output.write('|\n')
|
||||
self.output.write('┆\n')
|
||||
|
||||
self.hexes = []
|
||||
self.chars = []
|
||||
|
|
Loading…
Reference in New Issue