Skip to content

Conversation

@TechTheGuy
Copy link

@TechTheGuy TechTheGuy commented Oct 12, 2024

Here's the pull request I was referring to in issue n3: The code sends the packets (I checked with Wireshark).
The problem is that my esp8266 doesn't receive them for some reason... I don't know what to think...
I mean, the code at least runs now.
Thanks

@ChuckMash
Copy link
Owner

Can you check with scapy version 2.5.0? This yields an error for me

raise Scapy_Exception("Unsupported address family (%i) for interface [%s]" % (addrfamily, iff))  # noqa: E501
scapy.error.Scapy_Exception: Unsupported address family (803) for interface [*interface*]

@ChuckMash
Copy link
Owner

Ah, The issue for me with this is after my interface is put into monitor mode, the previous error occurs.
If I skip prep.sh then it works correctly, but then scapy cannot do what we need it to do.

I suggest the following try except for the time being.

  def hw_mac_as_str(self, interface):
    try:
      return scapy.get_if_hwaddr(interface).upper()
    except:
      return ("%02X:" * 6)[:-1] % tuple(scapy.orb(x) for x in scapy.get_if_raw_hwaddr(self.l2_socket.iface)[1])

If that works for you, please update the PR with this and I will approve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants