Пример #1
0
 def test_write_exploit_source(self):
     test_exploit = LinuxExploit()
     test_exploit.write_exploit_source()
     print("randomstring {}".format(test_exploit.source_c_path))
     self.assertTrue(os.path.exists(test_exploit.source_c_path))
     # remove it so it's not in the project
     if os.path.exists(test_exploit.source_c_path):
         os.remove(test_exploit.source_c_path)
Пример #2
0
 def test_compile_exploit_source(self):
     test_exploit = LinuxExploit()
     test_exploit.write_exploit_source()
     test_exploit.exploit_compile()
     self.assertTrue(os.path.exists(test_exploit.compilation_path))
     # remove files so they're not in the project
     if os.path.exists(test_exploit.source_c_path):
         os.remove(test_exploit.source_c_path)
     if os.path.exists(test_exploit.compilation_path):
         os.remove(test_exploit.compilation_path)