Example #1
0
 def getTargetIP(self):
     """Returns in string the value of the target IP retrieved from memory"""
     binIP = self.memory.recall(self.varTargetIP)
     if binIP is None:
         self.log.warn("Impossible to find the memorized value of the Target IP")
         return None
     return TypeConvertor.binB2string(binIP)
Example #2
0
 def getTargetPort(self):
     """Returns in int the value of the bind Port retrieved from memory"""
     binPort = self.memory.recall(self.varTargetPort)
     if binPort is None:
         self.log.warn("Impossible to find the memorized value of the Target Port")
         return None
     return int(TypeConvertor.binB2string(binPort))
Example #3
0
 def getProtocol(self):
     """Return in string the value of the protocol retrieved from the current memory"""
     binProtocol = self.memory.recall(self.varL4Protocol)
     if binProtocol is None:
         self.log.warn("Impossible to find the memorized value of the protocol")
         return None
     return TypeConvertor.binB2string(binProtocol)
Example #4
0
 def getTargetPort(self):
     """Returns in int the value of the bind Port retrieved from memory"""
     binPort = self.memory.recall(self.varTargetPort)
     if binPort is None:
         self.log.warn(
             "Impossible to find the memorized value of the Target Port")
         return None
     return int(TypeConvertor.binB2string(binPort))
Example #5
0
 def getTargetIP(self):
     """Returns in string the value of the target IP retrieved from memory"""
     binIP = self.memory.recall(self.varTargetIP)
     if binIP is None:
         self.log.warn(
             "Impossible to find the memorized value of the Target IP")
         return None
     return TypeConvertor.binB2string(binIP)
Example #6
0
 def getProtocol(self):
     """Return in string the value of the protocol retrieved from the current memory"""
     binProtocol = self.memory.recall(self.varL4Protocol)
     if binProtocol is None:
         self.log.warn(
             "Impossible to find the memorized value of the protocol")
         return None
     return TypeConvertor.binB2string(binProtocol)
Example #7
0
    def write(self, message):
        self.log.debug("Write down !")
        self.outputMessages.append(message)

        try:
            self.outputFile.write(TypeConvertor.binB2string(message))
            self.outputFile.flush()
        except:
            self.log.warn("An error occured while trying to write on the communication channel")
Example #8
0
 def bin2str(self, bina):
     return TypeConvertor.binB2string(bina)
Example #9
0
 def bin2str(self, bina):
     return TypeConvertor.binB2string(bina)