i wonder which hexdump()
scapy uses, since i would like to modify it, but i simply cant find anything.
what i DO find is:
def hexdump(self, lfilter=None):
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,"%04i"),
p.sprintf("%.time%"),
self._elt2sum(self.res[i]))
hexdump(p)
but that simply is an alternative for pkt.hexdump()
, which does a pkt.summary()
with a following hexdump(pkt)
could anyone tell me where to find the hexdump(pkt)
sourcecode?
what i want to have is the hex'ed packet, almost like str(pkt[0])
(where i can check byte by byte via str(pkt[0])[0]
), but with nothing else than hexvalues, just like displayed in hexdump(pkt)
.
maybe you guys could help me out with this one :)
found it, so, to answer my own question, it is located in utils.py