mft.py
622 Bytes
from module import Module
from runcmd import runProcess
import tomb
import os
def getInstance():
return MFTModule()
class MFTModule(Module):
def __init__(self):
self.name = "mft"
self.description = "Extracts NTFS MFT"
self.requiredVars = ["ntfsvol"]
self.vars = {}
def run(self):
path = tomb.getPath() + self.name + "/"
os.mkdir(path)
for vol in self.vars['ntfsvol'].value:
result = runProcess(["icat","/dev/" + vol,"0"])
mftbin = open(path + vol + ".bin",'wb')
mftbin.write(result[0])
mftbin.close()