I started to study Scapy today and I am getting a message: " WARNING No route found (no default route?) ." I am also a new Ubuntu user.
The name of my question sounds like a duplicate of the question Hide Scapy Warning Message IPv6. Hide Scapy Warning Message IPv6
However, when I used that solution, I do not get the warning but the problem continues.
Moreover, when I continue with other commands the problem persists.
I am using the " official " Scapy tutorial that is in this link: https://scapy.readthedocs.io/en/latest/usage.html
I am running Scapy on Python 3 over the Ubuntu 20.04 terminal. I installed Ubuntu using the Microsoft store (I am NOT using Oracle Virtual Box or something similar).
These are the commands:
a=Ether()/IP(dst="www.slashdot.org")/TCP()/"GET /index.html HTTP/1.0 \n\n"
hexdump(a)
This is the result that I am getting:
This is the result that I am supposed to get:
I am using a laptop and a wifi connection. I am running this code at home.
Thank you for your help!
PS In Ubuntu, when I use ifconfig I get the following:
PS #2 I uninstalled Ubuntu 20.04 and installed Ubuntu 18.04 and I still get the same problem.
PS #3 I installed Ubuntu 20.04 in an Oracle Virtual Box Machine, and I got a different message that got me some ideas about the possible causes of the problem. I posted a solution. Please read it, and let me know what you think.
It seems that the cause of the error is that as I am not using a wired connection, I am not using the network card. For that reason, the Ether()
function cannot be used. As every network card has a unique Mac address, the Mac address cannot be used. That, in my opinion, is the cause of the error. Of course, I would love to have an opinion of somebody who knows more about the subject. My college degree is in mathematics. In my last attempt, I installed Scapy on an Oracle Virtual Box Machine, and I am getting the following message:
WARNING: getmacbyip failed on [Errno 1] Operation not permitted WARNING: Mac address to reach destination not found. Using broadcast.
What do you think?
@Carcigenicate advised me to use the route command in Linux.
Here is the info that I get when I use the command route in the Ubuntu terminal that is in my Oracle virtual box machine.
When I use the command route in the Ubuntu terminal that is in my Windows 10 Pro Laptop, I get the following:
At this time, following the tip of @Carcigenicate, we find that the Gateway is 0.0.0.0
What that exactly means? Not sure. Check this link: https://en.wikipedia.org/wiki/0.0.0.0
I forgot to mention that my machine is a corporate machine. So, most likely my machine has some IT security software that causes that behavior.
I too faced the same problem:
WARNING No route found (no default route?)
I am using kali Linux, and this is how I solved that problem. I installed the PyX package for my OS and it worked out. I can't say definitely that this is the answer to your problem, but you could try it.
pip install PyX
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.