Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scapy is not working when IP is used as range in the ARP packet #2400

Closed
Parveshdhull opened this issue Jan 4, 2020 · 6 comments
Closed

Comments

@Parveshdhull
Copy link

Parveshdhull commented Jan 4, 2020

Python Version: 3.8.1 & 2.7.17(Tried Both)

Scapy Version: 2.4.3

Where Working?

It is working fine with a single IP address.
DeepinScreenshot_select-area_20200104155528

Where Not Working?

When passing the IP range in the constructor, it never worked.

But when we assign IP range, it works sometimes.

DeepinScreenshot_select-area_20200104161917

Tried Methods?

Tried in the script, like

from scapy.all import ARP
arp_request = ARP()
arp_request.pdst = ip
print(arp_request.summary())

Tried in terminal using scapy, whose screenshot attached above

EDIT: I tried to analyze packets sent by the main device using Wireshark on one of the devices present in the network.

I find that in spite of showing range as ??, sometime ARP request covers whole range 0-256 and programs stop successfully. But sometimes it stops at 192.168.43.170 and keeps sending the request for 192.168.43.1. And this also blocks the internet.

I don't know why at 192.168.43.170 because my gateway is at 192.168.43.1 and devices are at 192.168.43.98 and 192.168.43.198

Wireshark Output
DeepinScreenshot_select-area_20200104232928

@gpotter2
Copy link
Member

gpotter2 commented Jan 5, 2020

Did you retry against master ?
I'm pretty sure this was fixed in #2395

@Parveshdhull
Copy link
Author

Thanks, @gpotter2

I tried master and range representation, in summary, shows right.
But the problem persists.
I created a broadcast arp packet and broadcasted it. First time it completed the whole subnet and return 2 results. But second time it again got stuck on 170.
And it kept sending requests and blocked network.
I stopped using KeyboardInterrupt, and it printed some errors, displayed in Image.
SCAPY
DeepinScreenshot_select-area_20200105192451

WireShark
DeepinScreenshot_select-area_20200105192541

@Parveshdhull
Copy link
Author

These all above screenshots are from arch linux, I tried in debian based os and it worked fine. I think there was something wrong with my system, not with scapy.

@hackerish1
Copy link

even i have same issue. can anyone tell me how to fix this

@ibrahimmalek
Copy link

am facing the same with Kali Linux if creating ARP request with a single IP it works fine but with a range its getting me ?????
please advice

@nikhildr22
Copy link

upgrading scapy to its latest version will solve the issue - stackoverflow

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

No branches or pull requests

5 participants