Example #1
0
    def testSpiff679(self):
        with open('spiff.dd.679.out') as f:
            expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
        with open('spiff.dd', 'rb') as f:
            actual = tsk_helper.strip_all(istat_fat16.istat_fat16(f, 679, offset=2))

        self.assertEqual(expected, actual)
Example #2
0
    def testAdams5(self):
        with open('adams.dd.5.out') as f:
            expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
        with open('adams.dd', 'rb') as f:
            actual = tsk_helper.strip_all(istat_fat16.istat_fat16(f, 5))

        self.assertEqual(expected, actual)
Example #3
0
    def testFragmented7(self):
        with open('fragmented.dd.7.out') as f:
            expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
        with open('fragmented.dd', 'rb') as f:
            actual = tsk_helper.strip_all(istat_fat16.istat_fat16(f, 7, 1024))

        self.assertEqual(expected, actual)
Example #4
0
 def testAdams(self):
     self.maxDiff = None
     with open('adams.dd.fsstat.out') as f:
         expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
     with open('adams.dd', 'rb') as f:
         actual = tsk_helper.strip_all(fsstat_fat16.fsstat_fat16(f))
     self.assertEqual(expected, actual)
Example #5
0
 def testImage70(self):
     with open('image.ntfs.70.out') as f:
         expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
     with open('image.ntfs', 'rb') as f:
         actual = tsk_helper.strip_all(istat_ntfs.istat_ntfs(f, 70))
     if len(expected) != len(actual):
         self.fail()
     self.assertEqual(expected, actual)
Example #6
0
 def testSimple(self):
     with open('simple.ntfs.64.out') as f:
         expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
     with open('simple.ntfs', 'rb') as f:
         actual = tsk_helper.strip_all(istat_ntfs.istat_ntfs(f, 64))
     if len(expected) != len(actual):
         self.fail()
     self.assertEqual(expected, actual)
Example #7
0
 def testMM(self):
     with open('MM.iso.out') as f:
         expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
     with open('MM.iso', 'rb') as f:
         actual = tsk_helper.strip_all(fsstat_iso9660.fsstat_iso9660(f))
     if len(expected) != len(actual):
         self.fail()
     self.assertEqual(expected, actual)
Example #8
0
 def testAdams(self):
     with open('adams.dd.fsstat.out') as f:
         expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
     with open('adams.dd', 'rb') as f:
         actual = tsk_helper.strip_all(fsstat_fat16.fsstat_fat16(f))
         for line in actual:
             print(line)
     self.assertEqual(expected, actual)
Example #9
0
 def testImage65(self):
     self.maxDiff = None
     with open('image.ntfs.65.out') as f:
         expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
     with open('image.ntfs', 'rb') as f:
         actual = tsk_helper.strip_all(istat_ntfs.istat_ntfs(f, 65))
     # if len(expected) != len(actual):
     #     self.fail()
     self.assertEqual(expected, actual)