當前位置: 首頁>>代碼示例>>Python>>正文


Python utils.hexdump方法代碼示例

本文整理匯總了Python中utils.hexdump方法的典型用法代碼示例。如果您正苦於以下問題:Python utils.hexdump方法的具體用法?Python utils.hexdump怎麽用?Python utils.hexdump使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在utils的用法示例。


在下文中一共展示了utils.hexdump方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: rawhexdump

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import hexdump [as 別名]
def rawhexdump(self):
        """Prints an hexadecimal dump of each packet in the list"""
        for p in self:
            hexdump(self._elt2pkt(p)) 
開發者ID:medbenali,項目名稱:CyberScan,代碼行數:6,代碼來源:plist.py

示例2: hexraw

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import hexdump [as 別名]
def hexraw(self, lfilter=None):
        """Same as nsummary(), except that if a packet has a Raw layer, it will be hexdumped
        lfilter: a truth function that decides whether a packet must be displayed"""
        for i in range(len(self.res)):
            p = self._elt2pkt(self.res[i])
            if lfilter is not None and not lfilter(p):
                continue
            print "%s %s %s" % (conf.color_theme.id(i,fmt="%04i"),
                                p.sprintf("%.time%"),
                                self._elt2sum(self.res[i]))
            if p.haslayer(conf.raw_layer):
                hexdump(p.getlayer(conf.raw_layer).load) 
開發者ID:medbenali,項目名稱:CyberScan,代碼行數:14,代碼來源:plist.py

示例3: hexdump

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import hexdump [as 別名]
def hexdump(self, lfilter=None):
        """Same as nsummary(), except that packets are also hexdumped
        lfilter: a truth function that decides whether a packet must be displayed"""
        for i in range(len(self.res)):
            p = self._elt2pkt(self.res[i])
            if lfilter is not None and not lfilter(p):
                continue
            print "%s %s %s" % (conf.color_theme.id(i,fmt="%04i"),
                                p.sprintf("%.time%"),
                                self._elt2sum(self.res[i]))
            hexdump(p) 
開發者ID:medbenali,項目名稱:CyberScan,代碼行數:13,代碼來源:plist.py

示例4: padding

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import hexdump [as 別名]
def padding(self, lfilter=None):
        """Same as hexraw(), for Padding layer"""
        for i in range(len(self.res)):
            p = self._elt2pkt(self.res[i])
            if p.haslayer(Padding):
                if lfilter is None or lfilter(p):
                    print "%s %s %s" % (conf.color_theme.id(i,fmt="%04i"),
                                        p.sprintf("%.time%"),
                                        self._elt2sum(self.res[i]))
                    hexdump(p.getlayer(Padding).load) 
開發者ID:medbenali,項目名稱:CyberScan,代碼行數:12,代碼來源:plist.py

示例5: nzpadding

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import hexdump [as 別名]
def nzpadding(self, lfilter=None):
        """Same as padding() but only non null padding"""
        for i in range(len(self.res)):
            p = self._elt2pkt(self.res[i])
            if p.haslayer(Padding):
                pad = p.getlayer(Padding).load
                if pad == pad[0]*len(pad):
                    continue
                if lfilter is None or lfilter(p):
                    print "%s %s %s" % (conf.color_theme.id(i,fmt="%04i"),
                                        p.sprintf("%.time%"),
                                        self._elt2sum(self.res[i]))
                    hexdump(p.getlayer(Padding).load) 
開發者ID:medbenali,項目名稱:CyberScan,代碼行數:15,代碼來源:plist.py

示例6: padding

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import hexdump [as 別名]
def padding(self, lfilter=None):
        """Same as hexraw(), for Padding layer"""
        for i in range(len(self.res)):
            p = self._elt2pkt(self.res[i])
            if p.haslayer(conf.padding_layer):
                if lfilter is None or lfilter(p):
                    print "%s %s %s" % (conf.color_theme.id(i,fmt="%04i"),
                                        p.sprintf("%.time%"),
                                        self._elt2sum(self.res[i]))
                    hexdump(p.getlayer(conf.padding_layer).load) 
開發者ID:theralfbrown,項目名稱:smod-1,代碼行數:12,代碼來源:plist.py

示例7: nzpadding

# 需要導入模塊: import utils [as 別名]
# 或者: from utils import hexdump [as 別名]
def nzpadding(self, lfilter=None):
        """Same as padding() but only non null padding"""
        for i in range(len(self.res)):
            p = self._elt2pkt(self.res[i])
            if p.haslayer(conf.padding_layer):
                pad = p.getlayer(conf.padding_layer).load
                if pad == pad[0]*len(pad):
                    continue
                if lfilter is None or lfilter(p):
                    print "%s %s %s" % (conf.color_theme.id(i,fmt="%04i"),
                                        p.sprintf("%.time%"),
                                        self._elt2sum(self.res[i]))
                    hexdump(p.getlayer(conf.padding_layer).load) 
開發者ID:theralfbrown,項目名稱:smod-1,代碼行數:15,代碼來源:plist.py


注:本文中的utils.hexdump方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。