- This topic has 7 replies, 4 voices, and was last updated 4 years, 7 months ago by Vashisht Boodhun.
- AuthorPosts
- April 8, 2020 at 1:27 pm #33430BartoszParticipant
Hi,
Following the lecture “Using Scapy To Create an ARP Request”, when I run the program I get this return:
ARP who has ?? says ??
code:
“””
#!/usr/bin/env pythonimport scapy.all as scapy
def scan(ip):
arp_request = scapy.ARP(pdst=ip)
print(arp_request.summary())scan(“10.0.2.1/24”)
“””I tried:
1. the alternative function code:
def scan(ip):
arp_request = scapy.ARP()
arp_request.pdst=ip
print(arp_request.summary())2. reinstalling scapy
3. Installing the COMPLETE version of scapy
$ pip install –pre scapy[complete] -> didn’t work, but the pip3 method did:
pip3 install –pre scapy[complete]4. running the program with python3
(python3 network_scanner.py
instead of
python network_scanner.py)5. I thought maybe python can’t print it out because the return is not a string, so, out of despair, I tried “””print(str(arp_request.summary()))””” – but that didn’t help either.
Nothing helped, still getting the same result. (“ARP who has ?? says ??”)
Any further suggestions would be highly appreciated 🙂April 8, 2020 at 1:32 pm #33431BartoszParticipantIMPORTANT NOTE:
i just realized that feeding the function just a single IP works.
So instead of using the range:
scan(“10.0.2.1/24”)using just:
scan(“10.0.2.1.X”)works as expected.
How can I translate this functionality to use IP ranges?April 9, 2020 at 4:40 pm #33512Zaid SabihModeratorPlease try the following fix and it should allow you to search for ranges as shown in the lecture
pip uninstall scapypip install scapy==2.4.0
pip3 install scapy==2.4.0
April 9, 2020 at 7:45 pm #33525BartoszParticipantRESOLVED, thank you very much!
version 2.4.2 works as well
April 9, 2020 at 8:08 pm #33527BartoszParticipant…but so may other features still don’t, that I’ve decided to roll back to 2.4.0, as you suggested 🙂
Just wanted to share in case others experience similar issues.
Thanks again!April 13, 2020 at 4:08 pm #33858Zaid SabihModeratorYou’re welcome, I’m glad I could help 🙂
April 27, 2020 at 1:52 am #35044LaurentParticipantHi, I had the same issue. The above fix worked. Thank you for that.
However, I wanted to ask what version of scapy was installed earlier and whether we upgraded it to a newer version or rolled back to an older one. If it is an older version, does it mean we will run into problems when python will update?April 27, 2020 at 4:33 pm #35107Vashisht BoodhunParticipantActualy when we tested the new version, it didn’t work as expected that’s why we suggest to use the older version of scaoy.
- AuthorPosts
- You must be logged in to reply to this topic.