Browse Source

Add new docstrings and remove docstring param

The two new docstrings are added to be consistent with the rest
of the code.

The docstring parameter is removed as the referenced parameter
is no longer in use.
dustin.born 6 years ago
parent
commit
9f0df1bc4e

+ 10 - 0
code/Attack/MembersMgmtCommAttack.py

@@ -26,9 +26,19 @@ class MessageType(Enum):
     SALITY_HELLO_REPLY = 104
 
     def is_request(mtype):
+        """
+        Checks whether the given message type is a request or not.
+        :param mtype: the message type to check
+        :return: True if it is a request, False otherwise
+        """
         return mtype in {MessageType.SALITY_HELLO, MessageType.SALITY_NL_REQUEST}
 
     def is_response(mtype):
+        """
+        Checks whether the given message type is a response or not.
+        :param mtype: the message type to check
+        :return: True if it is a response, False otherwise
+        """
         return mtype in {MessageType.SALITY_HELLO_REPLY, MessageType.SALITY_NL_REPLY}
 
 class Message():

+ 0 - 1
code/ID2TLib/Botnet/CommunicationProcessor.py

@@ -12,7 +12,6 @@ class CommunicationProcessor():
     def __init__(self, mtypes:dict, nat:bool):
         """
         Creates an instance of CommunicationProcessor.
-        :param packets: the list of abstract packets
         :param mtypes: a dict containing an int to EnumType mapping of MessageTypes
         :param nat: whether NAT is present in this network
         """