|
1
|
from module import Module
|
|
2
3
|
from runcmd import runProcess
import tomb
|
|
4
|
import os
|
|
5
|
|
|
6
7
|
def getInstance():
return MFTModule()
|
|
8
9
10
|
class MFTModule(Module):
|
|
11
|
def __init__(self):
|
|
12
13
|
self.name = "mft"
self.description = "Extracts NTFS MFT"
|
|
14
15
|
self.requiredVars = ["ntfsvol"]
self.vars = {}
|
|
16
17
|
def run(self):
|
|
18
|
path = tomb.getPath() + self.name + "/"
|
|
19
20
|
if(not os.path.exists(path)):
os.mkdir(path)
|
|
21
|
for vol in self.vars['ntfsvol'].value:
|
|
22
|
result,code = runProcess(["icat","/dev/" + vol,"0"])
|
|
23
|
mftbin = open(path + vol + ".bin",'wb')
|
|
24
|
mftbin.write(result)
|
|
25
|
mftbin.close()
|
|
26
|
|