Closed ta-b0 closed 3 years ago
I'm sorry to poor English and edit sentence many time.
I'm sorry to poor English and edit sentence many time.
Thx for that context, it is indeed challenging to determine what you are asking me
'ctime' : self.file_entry.get_creation_time(),
'ctime' is change time or for NTFS MFT entry modification time, 'crtime' is creation time
The following code is very inefficient:
class mft_record():
def __init__(self,mft_file,index):
self.mft_file = mft_file
self.index = index
self.fsntfs = pyfsntfs.mft_metadata_file()
self.fsntfs.open(mft_file)
self.file_entry = self.fsntfs.get_file_entry(self.index)
# self.attribute = self.file_entry.get_attribute()
...
def analyze(mft_file):
for i in range(0,5):
mft = mft_record(mft_file,i)
print(mft.file())
It parses the full $MFT for every MFT entry (or record). Instead open the $MFT metadata file
at the start of analyze (before your for-loop)
I want to help how to analyze "get_name()" and "get_name_attribute_index()" from MFT metadata file?
When parsing stand-alone $MFT
file_entry.get_name()
will return None since there is corresponding $I30
directory entry. Since a MFT entry can represent multiple directory entries you'll have to iterate over the attributes.
for attribute in file_entry.attributes:
if attribute.attribute_type == 48:
print(attribute.name)
Thank you for your reply. I solve its problem and it run faster than before!
I want to analyze "file_entry.get_name()" and "get_name_attribute_index()" from MFT metadata but ALL entry are return it 'None'. Sample code (program.py) is here:
And run it in Windows10:
python program.py <MFT metadata path>
MFT metadata is extracted by FTK imager.
Top of this MFT metadata is below:
Result of this program is below:
I confirmed that it can run some functions but "get_name()" and "get_name_attribute_index()" can't run.
I want to help how to analyze "get_name()" and "get_name_attribute_index()" from MFT metadata file?