|
@@ -2,8 +2,9 @@ import unittest
|
|
|
import unittest.mock as mock
|
|
|
|
|
|
from Test.GenericTest import GenericTest
|
|
|
+from Test.Lib import get_bytes, get_x86_nop
|
|
|
|
|
|
-sha_one_attacker_ftp = 'd43ebfd5b0f3c9b6556e6a8d2ae4da4d334ed673881d67720eda16faab1b498e'
|
|
|
+sha_one_attacker_ftp = '941947ccc42ea10e724d2a20626882130d62fc5dbbe007095a90f67a943ab3bf'
|
|
|
|
|
|
"""
|
|
|
Name Stmts Miss Cover Missing
|
|
@@ -14,11 +15,9 @@ Attack/FTPWinaXeExploit.py 141 14 90% 55, 66, 71, 121-122, 148-
|
|
|
|
|
|
class UnitTestFTPWinaXeExploit(GenericTest):
|
|
|
|
|
|
- @mock.patch('ID2TLib.Utility.get_rnd_x86_nop')
|
|
|
- @mock.patch('ID2TLib.Utility.get_rnd_bytes')
|
|
|
- def test_one_attacker_ftp(self, mock_rnd_x86_nop, mock_rnd_bytes):
|
|
|
- mock_rnd_x86_nop.return_value = b''
|
|
|
- mock_rnd_bytes.return_value = b''
|
|
|
+ @mock.patch('ID2TLib.Utility.get_rnd_bytes', side_effect=get_bytes)
|
|
|
+ @mock.patch('ID2TLib.Utility.get_rnd_x86_nop', side_effect=get_x86_nop)
|
|
|
+ def test_one_attacker_ftp(self):
|
|
|
self.generic_test([['FTPWinaXeExploit']], sha_one_attacker_ftp)
|
|
|
|
|
|
|