|
@@ -46,7 +46,7 @@ class Message():
|
|
|
:param type_: the type of the message
|
|
|
:param time: the timestamp of the message
|
|
|
:param refer_msg_id: the ID this message is a request for or reply to. -1 if there is no related message.
|
|
|
- :param line_no: The line number this message appeared in the original file
|
|
|
+ :param line_no: The line number this message appeared at in the original CSV file
|
|
|
"""
|
|
|
self.msg_id = msg_id
|
|
|
self.src = src
|
|
@@ -54,11 +54,10 @@ class Message():
|
|
|
self.type = type_
|
|
|
self.time = time
|
|
|
self.refer_msg_id = refer_msg_id
|
|
|
- # if similar fields to line_no should be added consider a separate class
|
|
|
self.line_no = line_no
|
|
|
|
|
|
def __str__(self):
|
|
|
- str_ = "{0}. at {1}: {2}-->{3}, {4}, refer:{5}".format(self.msg_id, self.time, self.src, self.dst, self.type, self.refer_msg_id)
|
|
|
+ str_ = "{0}. at {1}: {2}-->{3}, {4}, refer:{5} (line {6})".format(self.msg_id, self.time, self.src, self.dst, self.type, self.refer_msg_id, self.line_no)
|
|
|
return str_
|
|
|
|
|
|
|
|
@@ -197,6 +196,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
|
|
|
# create packets to write to PCAP file
|
|
|
for msg in messages:
|
|
|
+ print(msg)
|
|
|
# retrieve the source and destination configurations
|
|
|
id_src, id_dst = msg.src["ID"], msg.dst["ID"]
|
|
|
ip_src, ip_dst = msg.src["IP"], msg.dst["IP"]
|