#NEWLINE# def main( record_filename ) : #NEWLINE# #INDENT# logging . basicConfig ( level = logging . DEBUG ) #NEWLINE# with Mmap ( attribute ) as buf : #NEWLINE# #INDENT# record = MFTRecord ( buf , 0 , None ) #NEWLINE# print ( '=== MFT Record Header' ) #NEWLINE# print ( record . get_all_string ( ) ) #NEWLINE# for attribute in record . attributes ( ) : #NEWLINE# #INDENT# print ( '=== Attribute Header (type: {:s}) at offset {:s}' . format ( Attribute . TYPES [ attribute . type ( ) ] , hex ( attribute . offset ( ) ) ) ) #NEWLINE# print ( attribute . get_all_string ( ) ) #NEWLINE# if ( attribute . type ( ) == ATTR_TYPE . STANDARD_INFORMATION ) : #NEWLINE# #INDENT# print ( '=== STANDARD INFORMATION value' ) #NEWLINE# si = StandardInformation ( attribute . value ( ) , 0 , None ) #NEWLINE# print ( si . get_all_string ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( attribute . type ( ) == ATTR_TYPE . FILENAME_INFORMATION ) : #NEWLINE# #INDENT# print ( '=== FILENAME INFORMATION value' ) #NEWLINE# fn = FilenameAttribute ( attribute . value ( ) , 0 , None ) #NEWLINE# print ( fn . get_all_string ( ) )