|
@@ -414,8 +414,8 @@ class BaseAttack(metaclass=abc.ABCMeta):
|
|
elif param_type == atkParam.ParameterTypes.TYPE_PACKET_POSITION:
|
|
elif param_type == atkParam.ParameterTypes.TYPE_PACKET_POSITION:
|
|
# This function call is valid only if there is a statistics object available.
|
|
# This function call is valid only if there is a statistics object available.
|
|
if self.statistics is None:
|
|
if self.statistics is None:
|
|
- print('Error: Statistics-dependent attack parameter added without setting a statistics object first.')
|
|
|
|
- exit(1)
|
|
|
|
|
|
+ raise RuntimeError(
|
|
|
|
+ 'Error: Statistics-dependent attack parameter added without setting a statistics object first.')
|
|
|
|
|
|
ts = pr.pcap_processor(self.statistics.pcap_filepath, "False", Util.RESOURCE_DIR).get_timestamp_mu_sec(int(value))
|
|
ts = pr.pcap_processor(self.statistics.pcap_filepath, "False", Util.RESOURCE_DIR).get_timestamp_mu_sec(int(value))
|
|
if 0 <= int(value) <= self.statistics.get_packet_count() and ts >= 0:
|
|
if 0 <= int(value) <= self.statistics.get_packet_count() and ts >= 0:
|