2
pkt = srp(Dot11(type=0,subtype=4,addr1 = 'xx:xx:xx:xx:xx:xx', addr2 = 'xx:xx:xx:xx:xx:xx'), iface = 'wlan0')

If I type:

pkt.summary()
pkt.show()
pkt.sprintf()
pkt.decode_payload_as() pkt.pdfdump()
pkt.command()

I get the Attribute error: 'tuple' object has no attribute 'e.g. summary'

This works if it's an IP or eth0 packet but not if its a WLAN

1 Answer 1

2

You have a mistake in your code. Unlike sniff(), srp() (like sr()) returns a Tuple of two elements:

  • a SndRcvList instance, for packets for which Scapy has received an asnwer.
  • a PacketList instance, for sent packets for which Scapy has not received an answer.

You could write:

>>> ans, unans = srp([your packet here], iface='wlan0')
>>> ans.summary()
[...]
>>> unans.summary()
[...]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.