Ejemplo n.º 1
0
 def __str__(self):
     """
     Returns a string representation.
     """
     s = Action.__str__(self)
     s += "{%d:%d}" % (self.start_ttl, self.end_ttl)
     return s
Ejemplo n.º 2
0
 def __str__(self):
     """
     Returns a string representation.
     """
     s = Action.__str__(self)
     s += "{%g}" % self.time
     return s
Ejemplo n.º 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
Ejemplo n.º 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