|
@@ -113,7 +113,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
|
|
|
# whether the destination port of a response should be the ephemeral port
|
|
|
# its request came from or a static (server)port based on a hostname
|
|
|
- Param.BOTNET_DST_PORT_CALCULATION: ParameterTypes.TYPE_BOOLEAN,
|
|
|
+ Param.MULTIPORT: ParameterTypes.TYPE_BOOLEAN,
|
|
|
|
|
|
# information about the interval selection strategy
|
|
|
Param.INTERVAL_SELECT_STRATEGY: ParameterTypes.TYPE_INTERVAL_SELECT_STRAT,
|
|
@@ -163,7 +163,9 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
|
|
|
# choose the input PCAP as default base for the TTL distribution
|
|
|
self.add_param_value(Param.TTL_FROM_CAIDA, False)
|
|
|
- self.add_param_value(Param.BOTNET_DST_PORT_CALCULATION, True)
|
|
|
+
|
|
|
+ # do not use multiple ports for requests and responses
|
|
|
+ self.add_param_value(Param.MULTIPORT, False)
|
|
|
|
|
|
# interval selection strategy
|
|
|
self.add_param_value(Param.INTERVAL_SELECT_STRATEGY, "optimal")
|
|
@@ -603,10 +605,10 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
|
|
|
portSelector = PortSelectors.LINUX
|
|
|
# create port configurations for the bots
|
|
|
- calculate_dst_port = self.get_param_value(Param.BOTNET_DST_PORT_CALCULATION)
|
|
|
+ use_multiple_ports = self.get_param_value(Param.MULTIPORT)
|
|
|
for bot in sorted(bot_configs):
|
|
|
bot_configs[bot]["SrcPort"] = portSelector.select_port_udp()
|
|
|
- if calculate_dst_port:
|
|
|
+ if not use_multiple_ports:
|
|
|
bot_configs[bot]["DstPort"] = Generator.gen_random_server_port()
|
|
|
else:
|
|
|
bot_configs[bot]["DstPort"] = portSelector.select_port_udp()
|