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)
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))
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)
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))
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)
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)
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")
def bin2str(self, bina): return TypeConvertor.binB2string(bina)