File tree Expand file tree Collapse file tree 2 files changed +2
-47
lines changed Expand file tree Collapse file tree 2 files changed +2
-47
lines changed Original file line number Diff line number Diff line change 43
43
from datetime import datetime
44
44
from impacket .examples import logger
45
45
from impacket import version
46
- from impacket .structure import Structure
47
-
48
-
49
- def pretty_print (x ):
50
- visible = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\' ()*+,-./:;<=>?@[\\ ]^_`{|}~ '
51
- return x if x in visible else '.'
52
-
53
- def hexdump (data ):
54
- x = str (data )
55
- strLen = len (x )
56
- i = 0
57
- while i < strLen :
58
- print ("%04x " % i , end = ' ' )
59
- for j in range (16 ):
60
- if i + j < strLen :
61
- print ("%02X" % ord (x [i + j ]), end = ' ' )
62
- else :
63
- print (" " , end = ' ' )
64
- if j % 16 == 7 :
65
- print ("" , end = ' ' )
66
- print (" " , end = ' ' )
67
- print ('' .join (pretty_print (x ) for x in x [i :i + 16 ] ))
68
- i += 16
46
+ from impacket .structure import Structure , hexdump
47
+
69
48
70
49
# Reserved/fixed MFTs
71
50
FIXED_MFTS = 16
Original file line number Diff line number Diff line change @@ -430,30 +430,6 @@ def __init__(self,data):
430
430
Structure .__init__ (self ,data )
431
431
432
432
433
- #def pretty_print(x):
434
- # if x in '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ ':
435
- # return x
436
- # else:
437
- # return '.'
438
- #
439
- #def hexdump(data):
440
- # x=str(data)
441
- # strLen = len(x)
442
- # i = 0
443
- # while i < strLen:
444
- # print "%04x " % i,
445
- # for j in range(16):
446
- # if i+j < strLen:
447
- # print "%02X" % ord(x[i+j]),
448
- #
449
- # else:
450
- # print " ",
451
- # if j%16 == 7:
452
- # print "",
453
- # print " ",
454
- # print ''.join(pretty_print(x) for x in x[i:i+16] )
455
- # i += 16
456
-
457
433
def getUnixTime (t ):
458
434
t -= 116444736000000000
459
435
t //= 10000000
You can’t perform that action at this time.
0 commit comments