예제 #1
0
 def __str__(self):
     """
     Returns a string representation.
     """
     s = Action.__str__(self)
     s += "{%d:%d}" % (self.start_ttl, self.end_ttl)
     return s
예제 #2
0
 def __str__(self):
     """
     Returns a string representation.
     """
     s = Action.__str__(self)
     s += "{%g}" % self.time
     return s
예제 #3
0
 def __str__(self):
     """
     Returns a string representation with the fragsize
     """
     s = Action.__str__(self)
     if self.segment:
         s += "{" + "tcp" + ":" + str(self.fragsize) + ":" + str(
             self.correct_order) + "}"
     else:
         s += "{" + "ip" + ":" + str(self.fragsize) + ":" + str(
             self.correct_order) + "}"
     return s
예제 #4
0
    def __str__(self):
        """
        Defines string representation for this object.
        """
        s = Action.__str__(self)
        if self.tamper_type == "corrupt":
            s += "{%s:%s:%s}" % (self.tamper_proto_str, self.field,
                                 self.tamper_type)
        elif self.tamper_type in ["replace"]:
            s += "{%s:%s:%s:%s}" % (self.tamper_proto_str, self.field,
                                    self.tamper_type, self.tamper_value)

        return s