本文整理汇总了Python中netzob.Common.Type.TypeConvertor.TypeConvertor.hexdump方法的典型用法代码示例。如果您正苦于以下问题:Python TypeConvertor.hexdump方法的具体用法?Python TypeConvertor.hexdump怎么用?Python TypeConvertor.hexdump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类netzob.Common.Type.TypeConvertor.TypeConvertor
的用法示例。
在下文中一共展示了TypeConvertor.hexdump方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: displayMessage
# 需要导入模块: from netzob.Common.Type.TypeConvertor import TypeConvertor [as 别名]
# 或者: from netzob.Common.Type.TypeConvertor.TypeConvertor import hexdump [as 别名]
def displayMessage(self, message):
# Clean the hexdump view
self.textview.get_buffer().delete(self.textview.get_buffer().get_start_iter(), self.textview.get_buffer().get_end_iter())
# Fecth the content of the message to display
hexContent = TypeConvertor.hexdump(TypeConvertor.netzobRawToPythonRaw(message.getData()))
# Update the hexdump
self.textview.get_buffer().insert_with_tags_by_name(self.textview.get_buffer().get_start_iter(), hexContent, "normalTag")
示例2: getMessageDetails
# 需要导入模块: from netzob.Common.Type.TypeConvertor import TypeConvertor [as 别名]
# 或者: from netzob.Common.Type.TypeConvertor.TypeConvertor import hexdump [as 别名]
def getMessageDetails(self, messageID):
if not messageID in self._payloadDict:
errorMessage = _("Message ID: {0} not found in importer " +
"message list").format(messageID)
logging.error(errorMessage)
raise NetzobImportException("IPC", errorMessage, ERROR)
payload = self._payloadDict[messageID]
return TypeConvertor.hexdump(TypeConvertor.netzobRawToPythonRaw(payload))
示例3: doGetMessageDetails
# 需要导入模块: from netzob.Common.Type.TypeConvertor import TypeConvertor [as 别名]
# 或者: from netzob.Common.Type.TypeConvertor.TypeConvertor import hexdump [as 别名]
def doGetMessageDetails(self, messageID):
message = self.model.getMessageByID(str(messageID))
properties = [(props.getName(), props.getCurrentValue()) for props in message.getProperties()
if props.getName() != 'Data']
messageDetails = "\n".join(["{0}: {1}".format(*prop)
for prop in properties])
messageDetails += "\n\n" + TypeConvertor.hexdump(TypeConvertor.netzobRawToPythonRaw(message.getStringData()))
return messageDetails
示例4: doGetMessageDetails
# 需要导入模块: from netzob.Common.Type.TypeConvertor import TypeConvertor [as 别名]
# 或者: from netzob.Common.Type.TypeConvertor.TypeConvertor import hexdump [as 别名]
def doGetMessageDetails(self, messageID):
message = self.model.getMessageByID(str(messageID))
return TypeConvertor.hexdump(TypeConvertor.netzobRawToPythonRaw(message.getData()))