From ef3d1a2e20ac3c0bc1ea5f090f9b264f6efce0a3 Mon Sep 17 00:00:00 2001 From: Phil <phil@secdev.org> Date: Tue, 17 Mar 2009 08:55:50 -0700 Subject: [PATCH] Improved ARP.my_summary() --- scapy/layers/l2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scapy/layers/l2.py b/scapy/layers/l2.py index e1ae21a8..97ed5a1a 100644 --- a/scapy/layers/l2.py +++ b/scapy/layers/l2.py @@ -340,11 +340,11 @@ class ARP(Packet): return "",s def mysummary(self): if self.op == self.is_at: - return "ARP is at %s says %s" % (self.hwsrc, self.psrc) + return self.sprintf("ARP is at %hwsrc% says %psrc%") elif self.op == self.who_has: - return "ARP who has %s says %s" % (self.pdst, self.psrc) + return self.sprintf("ARP who has %pdst% says %psrc%") else: - return "ARP %ARP.op% %ARP.psrc% > %ARP.pdst%" + return self.sprintf("ARP %op% %psrc% > %pdst%") conf.neighbor.register_l3(Ether, ARP, lambda l2,l3: getmacbyip(l3.pdst)) -- GitLab