Submission ready state achieved (#8)
This commit is contained in:
@@ -19,7 +19,8 @@ class ExploitTest(unittest.TestCase):
|
||||
|
||||
def __check_extract_activation_key__(self, is_debug: bool):
|
||||
port = DEBUG_PORT if is_debug else RELEASE_PORT
|
||||
key = exploit.extract_premium_key(is_debug, port)
|
||||
exploit.PORT = port
|
||||
key = exploit.extract_premium_key(is_debug)
|
||||
self.assertEqual(key, __get_activation_key__())
|
||||
|
||||
def test_extract_activation_key_debug(self):
|
||||
@@ -30,7 +31,8 @@ class ExploitTest(unittest.TestCase):
|
||||
|
||||
def __check_get_flag__(self, is_debug: bool):
|
||||
port = DEBUG_PORT if is_debug else RELEASE_PORT
|
||||
p = exploit.connect(__get_activation_key__(), True, port)
|
||||
exploit.PORT = port
|
||||
p = exploit.connect(__get_activation_key__(), True)
|
||||
flag = exploit.get_flag(p, is_debug)
|
||||
self.assertRegex(flag, "flag_[0-9a-f]{32}")
|
||||
|
||||
@@ -42,8 +44,9 @@ class ExploitTest(unittest.TestCase):
|
||||
|
||||
def __check_combined__(self, is_debug: bool):
|
||||
port = DEBUG_PORT if is_debug else RELEASE_PORT
|
||||
activation_key = exploit.extract_premium_key(is_debug, port)
|
||||
p = exploit.connect(activation_key, True, port)
|
||||
exploit.PORT = port
|
||||
activation_key = exploit.extract_premium_key(is_debug)
|
||||
p = exploit.connect(activation_key, True)
|
||||
flag = exploit.get_flag(p, is_debug)
|
||||
self.assertRegex(flag, "flag_[0-9a-f]{32}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user