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