Comments (9)
Oops, I missed this here, sorry about that.
I can't really test this little script anymore, since opted to upgrade to the Fritz!Box, now that it's actually available from Vodafone.
That's pretty annoying, though, that they're removing features like that. :/
Because I can't really test this script anymore, I don't really feel comfortable just replacing the package myself. I can leave this issue open for others to see. Fair?
from tg3442_firewall.
Oh, and thanks for the heads-up, of course :)
from tg3442_firewall.
Ah, okay, reading about it more, it's rather that PyCrypto seems to be abandoned. MODE_CCM was introduced with an experimental version in 2013 that barely anybody has picked up.
PyCryptodome seems to be the recommended implementation for it now, acting as a drop-in replacement. It even puts stuff into Crypto.*, like PyCrypto used to do. I too have PyCryptodome installed through the Gentoo package manager, not PyCrypto.
So I guess the correct fix for this issue is not to change anything in script, but people need to just install PyCryptodome instead of PyCrypto.
from tg3442_firewall.
On Debian (and Devuan), there's python3-pycryptodome, and Crypto.Cipher exists too (in python3-crypto), but without AES_CCM; so there the change is needed.
from tg3442_firewall.
Ugh, that's a bit of a mess :/
On Debian, what's the namespace of the crypto with AES_CCM, then? CryptoDome.Cipher?
from tg3442_firewall.
Cryptodome.Cipher.
As in:
from Cryptodome.Cipher import AES
print(AES.AES_CCM)
from tg3442_firewall.
Hmm, here on Gentoo, it's not within Cryptodome, but Crypto.
It seems Cryptodome can be packaged either way, with the version with the Cryptodome namespace being called cryptodomex?
I guess what this script needs, then, is a conditional import. I admit I'm not really that firm in Python (I just use it occasionally, mostly for things like IDAPython or somesuch).
Is there a way to probe for what's available? Or alternatively, would something like
try:
from Cryptodome.Cipher import AES
except ImportError:
from Crypto.Cipher import AES
work? I.e. try to import from Cryptodome, and if that doesn't exist (because Cryptodome has been packaged ito the Crypto namespace instead) use Crypto?
from tg3442_firewall.
That's a pattern that I have seen, yes, that should work.
from tg3442_firewall.
Okay, pushed this as a fix as 27020d8. Thanks! :)
Feel free to poke me if this still doesn't work for you.
from tg3442_firewall.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tg3442_firewall.