Пример #1
0
 def test_elf(self):
     filename = os.path.join(os.path.dirname(__file__), 'binaries', 'basic_linux_amd64')
     f = Elf(filename)
     self.assertTrue(
         [(4194304, 823262, 'r x', 'tests/binaries/basic_linux_amd64', 0, 823262),
          (7118520, 16112, 'rw ', 'tests/binaries/basic_linux_amd64', 827064, 7320)],
         list(f.maps())
     )
     self.assertTrue([('Running', {'EIP': 4196624})], list(f.threads()))
     self.assertIsNone(f.getInterpreter())
Пример #2
0
 def test_elf(self):
     filename = os.path.join(DIRPATH, "binaries", "basic_linux_amd64")
     f = Elf(filename)
     self.assertTrue(
         [
             (4194304, 823262, "r x", "tests/binaries/basic_linux_amd64", 0, 823262),
             (7118520, 16112, "rw ", "tests/binaries/basic_linux_amd64", 827064, 7320),
         ],
         list(f.maps()),
     )
     self.assertTrue([("Running", {"EIP": 4196624})], list(f.threads()))
     self.assertIsNone(f.getInterpreter())
     f.elf.stream.close()