mft.py
666 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 + "/"
if(not os.path.exists(path)):
os.mkdir(path)
for vol in self.vars['ntfsvol'].value:
result,code = runProcess(["icat","/dev/" + vol,"0"])
mftbin = open(path + vol + ".bin",'wb')
mftbin.write(result)
mftbin.close()