diff --git a/scapy/supersocket.py b/scapy/supersocket.py index 8acfaa65ac9fe9ba1e0bb78187f6fb24f9354c22..8b38e4d611cc1167df9163f691264cc62d463365 100644 --- a/scapy/supersocket.py +++ b/scapy/supersocket.py @@ -192,7 +192,15 @@ class L2ListenTcpdump(SuperSocket): self.outs = None args = ['-w', '-', '-s', '65535'] if iface is not None: - args.extend(['-i', iface]) + if WINDOWS: + try: + args.extend(['-i', iface.pcap_name]) + except AttributeError: + args.extend(['-i', iface]) + else: + args.extend(['-i', iface]) + elif WINDOWS: + args.extend(['-i', conf.iface.pcap_name]) if not promisc: args.append('-p') if not nofilter: