Jelajahi Sumber

additional TODOs for missing documentation

Roey Regev 6 tahun lalu
induk
melakukan
ddb51b8a11
4 mengubah file dengan 23 tambahan dan 4 penghapusan
  1. 19 0
      code/ID2TLib/Label.py
  2. 1 1
      code/ID2TLib/PcapFile.py
  3. 2 2
      code/ID2TLib/SMB2.py
  4. 1 1
      code/ID2TLib/Utility.py

+ 19 - 0
code/ID2TLib/Label.py

@@ -21,15 +21,34 @@ class Label:
         self.parameters = parameters
 
     def __eq__(self, other):
+        """
+        TODO: FILL ME
+        :param other:
+        :return:
+        """
         return self.timestamp == other.timestamp
 
     def __lt__(self, other):
+        """
+        TODO: FILL ME
+        :param other:
+        :return:
+        """
         return self.timestamp_start < other.timestamp_start
 
     def __gt__(self, other):
+        """
+        TODO: FILL ME
+        :param other:
+        :return:
+        """
         return self.timestamp_start > other.timestamp_start
 
     def __str__(self):
+        """
+        TODO: FILL ME
+        :return:
+        """
         return ''.join(
             ['(', self.attack_name, ',', self.attack_note, ',', str(self.timestamp_start), ',', str(self.timestamp_end),
              ')'])

+ 1 - 1
code/ID2TLib/PcapFile.py

@@ -27,7 +27,7 @@ class PcapFile(object):
 
     def get_file_hash(self):
         """
-        Returns the hash for the loaded PCAP file. The hash is calculated bsaed on:
+        Returns the hash for the loaded PCAP file. The hash is calculated based on:
 
         - the file size in bytes
         - the first 224*40000 bytes of the file

+ 2 - 2
code/ID2TLib/SMB2.py

@@ -2,7 +2,7 @@ import scapy.packet as packet
 import scapy.fields as field
 import scapy.layers.netbios as netbios
 
-
+# TODO: FILL ME
 class SMB2_SYNC_Header(packet.Packet):
     namez = "SMB2Negociate Protocol Response Header"
     fields_desc = [field.StrFixedLenField("Start", "\xfeSMB", 4),
@@ -21,7 +21,7 @@ class SMB2_SYNC_Header(packet.Packet):
                    field.LELongField("Signature2", 0)]
 
 
-# No Support of Security Buffer , Padding or Dialect Revision 0x0311
+# TODO: FILL ME Description was not correct anymore
 class SMB2_Negotiate_Protocol_Response(packet.Packet):
     namez = "SMB2Negociate Protocol Response"
     fields_desc = [field.LEShortField("StructureSize", 65),

+ 1 - 1
code/ID2TLib/Utility.py

@@ -65,7 +65,7 @@ def get_interval_pps(complement_interval_pps, timestamp):
     for row in complement_interval_pps:
         if timestamp <= row[0]:
             return row[1]
-    return complement_interval_pps[-1][1]  # in case the timstamp > capture max timestamp
+    return complement_interval_pps[-1][1]  # in case the timestamp > capture max timestamp
 
 
 def get_nth_random_element(*element_list):