diff --git a/utils.py b/utils.py index e67cf1f..1930a4e 100644 --- a/utils.py +++ b/utils.py @@ -306,40 +306,3 @@ def StartupMessage(): print ' %-27s' % "Don't Respond To Names" + color(str(settings.Config.DontRespondToName), 5, 1) print "\n\n" - -# Useful for debugging -def hexdump(src, l=0x16): - res = [] - sep = '.' - src = str(src) - - for i in range(0, len(src), l): - s = src[i:i+l] - hexa = '' - - for h in range(0,len(s)): - if h == l/2: - hexa += ' ' - h = s[h] - if not isinstance(h, int): - h = ord(h) - h = hex(h).replace('0x','') - if len(h) == 1: - h = '0'+h - hexa += h + ' ' - - hexa = hexa.strip(' ') - text = '' - - for c in s: - if not isinstance(c, int): - c = ord(c) - - if 0x20 <= c < 0x7F: - text += chr(c) - else: - text += sep - - res.append(('%08X: %-'+str(l*(2+1)+1)+'s |%s|') % (i, hexa, text)) - - return '\n'.join(res)