|
@@ -133,7 +133,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
self.add_param_value(Param.IP_REUSE_EXTERNAL, 0.5)
|
|
|
|
|
|
# add default additional padding
|
|
|
- self.add_param_value(Param.PACKET_PADDING, 0)
|
|
|
+ self.add_param_value(Param.PACKET_PADDING, 20)
|
|
|
|
|
|
|
|
|
def generate_attack_pcap(self):
|
|
@@ -188,7 +188,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
# create suitable IP/UDP packet and add to packets list
|
|
|
packet = pkt_gen.generate_mmcom_packet(ip_src=ip_src, ip_dst=ip_dst, ttl=ttl, mac_src=mac_src, mac_dst=mac_dst,
|
|
|
port_src=port_src, port_dst=port_dst, message_type=msg.type, neighborlist_entries=nl_size)
|
|
|
- PaddingGenerator.add_padding(packet, padding)
|
|
|
+ PaddingGenerator.add_padding(packet, padding,True, True)
|
|
|
|
|
|
packet.time = pcap_timestamp
|
|
|
packets.append(packet)
|
|
@@ -199,7 +199,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
self.attack_start_utime = packets[0].time
|
|
|
elif total_pkts % BUFFER_SIZE == 0: # every 1000 packets write them to the PCAP file (append)
|
|
|
packets = list(packets)
|
|
|
- PaddingGenerator.equal_length(packets)
|
|
|
+ PaddingGenerator.equal_length(packets, padding = padding)
|
|
|
last_packet = packets[-1]
|
|
|
path_attack_pcap = self.write_attack_pcap(packets, True, path_attack_pcap)
|
|
|
packets = deque(maxlen=BUFFER_SIZE)
|
|
@@ -207,7 +207,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
# if there are unwritten packets remaining, write them to the PCAP file
|
|
|
if len(packets) > 0:
|
|
|
packets = list(packets)
|
|
|
- PaddingGenerator.equal_length(packets)
|
|
|
+ PaddingGenerator.equal_length(packets, padding = padding)
|
|
|
path_attack_pcap = self.write_attack_pcap(packets, True, path_attack_pcap)
|
|
|
last_packet = packets[-1]
|
|
|
|