test_FTPWinaXeExploit.py 876 B

12345678910111213141516171819202122232425
  1. import unittest
  2. import unittest.mock as mock
  3. from Test.GenericTest import GenericTest
  4. from Test.Lib import get_bytes, get_x86_nop
  5. sha_one_attacker_ftp = '941947ccc42ea10e724d2a20626882130d62fc5dbbe007095a90f67a943ab3bf'
  6. """
  7. Name Stmts Miss Cover Missing
  8. --------------------------------------------------------------------------------------------
  9. Attack/FTPWinaXeExploit.py 141 14 90% 55, 66, 71, 121-122, 148-150, 208-214
  10. """
  11. class UnitTestFTPWinaXeExploit(GenericTest):
  12. @mock.patch('ID2TLib.Utility.get_rnd_bytes', side_effect=get_bytes)
  13. @mock.patch('ID2TLib.Utility.get_rnd_x86_nop', side_effect=get_x86_nop)
  14. def test_one_attacker_ftp(self, mock_get_rnd_bytes, mock_get_rnd_x86_nop):
  15. self.generic_test([['FTPWinaXeExploit']], sha_one_attacker_ftp)
  16. if __name__ == '__main__':
  17. unittest.main()