From 6320acf43133a0989291e8f94e8ef6cbf5f753bb Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Tue, 25 Oct 2016 17:38:24 +0200 Subject: [PATCH] Implemented info module (Issue #2. Issue #4 is already fixed.. Issue #1 is fixed --- README.md | 3 ++- modules/info.py | 14 +++++++++++--- modules/mft.py | 7 ++++--- modules/winreg.py | 3 ++- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7886218..bd103b9 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,5 @@ REQUIRED PACKAGES * python3-dialog * sleuthkit * pev -* ntfs-3g \ No newline at end of file +* ntfs-3g +* lshw \ No newline at end of file diff --git a/modules/info.py b/modules/info.py index 98c7ff1..3f006a0 100644 --- a/modules/info.py +++ b/modules/info.py @@ -16,6 +16,14 @@ class INFOModule(Module): def run(self): path = tomb.getPath() + self.name + "/" - os.mkdir(path) - #TODO - #getinfo + if(not os.path.exists(path)): + os.mkdir(path) + output,code = runProcess("lshw") + lshw = open(path + "lshw.txt", 'wb') + lshw.write(output) + lshw.close() + + output,code = runProcess("dmidecode") + lshw = open(path + "dmidecode.txt", 'wb') + lshw.write(output) + lshw.close() \ No newline at end of file diff --git a/modules/mft.py b/modules/mft.py index ed471d4..8a00cd3 100644 --- a/modules/mft.py +++ b/modules/mft.py @@ -16,10 +16,11 @@ class MFTModule(Module): def run(self): path = tomb.getPath() + self.name + "/" - os.mkdir(path) + if(not os.path.exists(path)): + os.mkdir(path) for vol in self.vars['ntfsvol'].value: - result = runProcess(["icat","/dev/" + vol,"0"]) + result,code = runProcess(["icat","/dev/" + vol,"0"]) mftbin = open(path + vol + ".bin",'wb') - mftbin.write(result[0]) + mftbin.write(result) mftbin.close() diff --git a/modules/winreg.py b/modules/winreg.py index 8d4baa6..a3c4019 100644 --- a/modules/winreg.py +++ b/modules/winreg.py @@ -18,7 +18,8 @@ class RegistryModule(Module): def run(self): path = tomb.getPath() + self.name + "/" - os.mkdir(path) + if(not os.path.exists(path)): + os.mkdir(path) for vol in self.vars['winvol'].value: mntpoint = "/mnt/" mntid = mount("/dev/" + vol) -- libgit2 0.22.2