Ether / ARP who has ? says?

I have a problem with building a network scanner.
I installed scapy package using pip command, but I am not able to run an ARP request.

!/usr/bin/env python3

import scapy.all as scapy

def scan(ip):
    arp_request = scapy.ARP(pdst=ip)
    broadcast = scapy.Ether(dst="ff:ff:ff:ff:ff:ff")
    arp_result = broadcast/arp_request


And with code i returns me “Ether / ARP who has ?? says ??”
and this error message:

Traceback (most recent call last):
  File "", line 14, in <module>
  File "", line 11, in scan
  File "/home/kali/.local/lib/python2.7/site-packages/scapy/", line 1261, in show
    return self._show_or_dump(dump, indent, lvl, label_lvl)
  File "/home/kali/.local/lib/python2.7/site-packages/scapy/", line 1235, in _show_or_dump
    reprval = f.i2repr(self, fvalue)
  File "/home/kali/.local/lib/python2.7/site-packages/scapy/", line 502, in i2repr
    x = self.i2h(pkt, x)
  File "/home/kali/.local/lib/python2.7/site-packages/scapy/layers/", line 136, in i2h
    iff = self.getif(pkt)
  File "/home/kali/.local/lib/python2.7/site-packages/scapy/layers/", line 132, in <lambda>
    self.getif = (lambda pkt: pkt.route()[0]) if getif is None else getif
  File "/home/kali/.local/lib/python2.7/site-packages/scapy/", line 1185, in route
    return self.payload.route()
  File "/home/kali/.local/lib/python2.7/site-packages/scapy/layers/", line 400, in route
    fld, dst = fld._find_fld_pkt_val(self, dst)
  File "/home/kali/.local/lib/python2.7/site-packages/scapy/", line 313, in _find_fld_pkt_val
    if val == dflts_pkt[] and not in pkt.fields:
  File "/home/kali/.local/lib/python2.7/site-packages/scapy/", line 133, in __eq__
    p2, nm2 = self._parse_net(other)
  File "/home/kali/.local/lib/python2.7/site-packages/scapy/", line 99, in _parse_net
    tmp = net.split('/') + ["32"]
AttributeError: 'NoneType' object has no attribute 'split'

Does anyone has the same issue?
Thanks for any reply :slight_smile:

Hi myName,

Please make sure that you’re using Python 2 interpreter to follow along, cause all the code that you will write later on in the course are based on Python 2, and if you want to test other attacks related to ‘Man In The Middle’ attacks, then you should be able to run them all in Python 2 to prevent interference between Python 2 and Python 3 while the code is running since you need several programs running at once in different terminal windows as you will see later on. If you still have issues, then try to uninstall scapy and install another version:

pip uninstall scapy
pip uninstall scapy-http
pip install scapy==2.4.2
pip install scapy-http==1.8.2

Make sure that you fix the shebang in the above code to specify Python 2 instead of 3:
#!/usr/bin/env python


Thank you very much for your reply.
A reinstalled scapy, as you suggest and it works now.
Also Thank you for notice about using python 2 in the course.

You’re welcome, no problem :- )

1 Like

Thank you! this solved my issue as well :slight_smile:

Thanks man, appreciate this. It was driving me mad! :frowning:

I am not sure what I had done (probably through poking around with it lol) but I had to remove scapy from pycharm first, through the project settings. And then run the installers and it worked :slight_smile:

Please can anyone help !
Ether / ARP who has ?? says ??
I am gettiing only this without a error

This is the code I wrote :

#!/usr/bin/env python

import scapy.all as scapy

def scan(ip):
arp_request = scapy.ARP(pdst=ip)
broadcast = scapy.Ether(dst=“ff:ff:ff:ff:ff:ff”)
arp_request_broadcast = broadcast/arp_request


Hi Youssef,

Sorry for the delayed response. I ended up hitting some more issues further down the line. I believe it’s to do with the version of scapy and certain classes failing to reference. One of the guys on here told me you can download the version of Kali that Zaid uses and I would highly recommend it. It comes complete with all the applications and modules he is using in the course. I am a tiny, tiny bit frustrated I didn’t know about this in the first place.

Anyways, here is the link: Zaid’s custom Kali

I would try to avoid running any updates on it unless stated in the course. Hope this helps :slight_smile:

Thank you Steven for the reply. It helped me a lot. I think this link should be added provided at the start of the course. That would have saved me so much of the time I spent searching how to fix the bugs I encountered, which took days.

I am getting the same issue. Did you find out the solution?

Hi @Allan_Castro, try installing the custom Kali from this link it will have the correct version of Scapy. If not then you can follow the steps that @AJS posted if you scroll up and look at the second post.

Thank you, Apurv! it works now for me. I found out too that the scapy version should be 2.4.0 not 2.4.2 or 2.4.3. it only works on Scapy 2.4.0. :slight_smile:


Having problem with scapy too, I did the uninstall then install scapy 2.4.2, and scapy-http 1.8.2.
When uninstalling scapy-http, I got the message that it was not installed (never know if this info might be useful).

However, since this, I’ve Pycharm that is freezing quite often. Like if I change desktop to go into Terminator then when I come back … I just can not do anything in Pycharm. The only solution so far is to quit and re-run, that is a bit annoying.

Might this be related to Pycharm version as it is suggesting me to update to version 2020.2.5? Is it ok to do that update?

I don’t suggest using Pycharm. Run the py file in your terminal itself. Maybe it is something to do with pycharm version but I don’t know about that, never used pycharm.

The AttributeError is an exception thrown when an object does not have the attribute you tried to access. ‘NoneType’ object has no attribute ‘split’ often indicates that the attribute you are trying to split is Null, meaning there is no value in it to split. So, you need to check the attribute is not Null before splitting. Something like…

if val is not None:
    # ...