So I used to be able to import scapy's base64_bytes
by using from scapy.all import base64_bytes
. However, I get this error when I do that:
PIP package scapy-python3 used to provide scapy3k, which was a fork from scapy implementing python3 compatibility since 2016. This package was included in some of the Linux distros under name of python3-scapy. Starting from scapy version 2.4 (released in March, 2018) mainstream scapy supports python3. To reduce any confusion scapy3k was renamed to kamene.
I tried renaming it to from kamene.all import base64_bytes
, but still no luck. Is there any other alternative to base64_bytes
or am I just importing it incorrectly?
There is a lot of confusion between Scapy and kamene. From https://scapy.net
An independent fork of Scapy was created from v2.2.0 in 2015, aimed at
supporting only Python3 (scapy3k). The fork diverged, did not follow
evolutions and fixes, and has had its own life without contributions
back to Scapy. Unfortunately, it has been packaged as python3-scapy in
some distributions, and as scapy-python3 on PyPI leading to confusion
amongst users. It should not be the case anymore soon. Scapy supports
Python3 in addition to Python2 since 2.4.0. Scapy v2.4.0 should be
favored as the official Scapy code base. The fork has been renamed as
kamene.
You are using kamene, and old Scapy fork with no support whatsoever.
You probably have installed scapy-python3
on PyPI. Uninstall it and use pip3 install scapy
NOT to use kamene is the best advice I can give you...