mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-17 20:35:40 +02:00
Support Cryptodome namespace when Crypto is unavailable
This commit is contained in:
@@ -5,8 +5,13 @@ import logging
|
||||
from struct import unpack
|
||||
from typing import Tuple
|
||||
|
||||
from Crypto.Cipher import ARC4, AES
|
||||
from Crypto.Hash import HMAC
|
||||
try:
|
||||
from Crypto.Cipher import ARC4, AES
|
||||
from Crypto.Hash import HMAC
|
||||
except ImportError:
|
||||
# Debian/Ubuntu ship pycryptodome under Cryptodome namespace
|
||||
from Cryptodome.Cipher import ARC4, AES
|
||||
from Cryptodome.Hash import HMAC
|
||||
|
||||
from volatility3.framework import interfaces, renderers, exceptions
|
||||
from volatility3.framework.configuration import requirements
|
||||
|
||||
@@ -7,7 +7,11 @@ import logging
|
||||
from struct import pack, unpack
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
from Crypto.Cipher import AES, ARC4, DES
|
||||
try:
|
||||
from Crypto.Cipher import ARC4, DES, AES
|
||||
except ImportError:
|
||||
# Debian/Ubuntu ship pycryptodome under Cryptodome namespace
|
||||
from Cryptodome.Cipher import ARC4, DES, AES
|
||||
|
||||
from volatility3.framework import interfaces, renderers, exceptions, constants
|
||||
from volatility3.framework.configuration import requirements
|
||||
|
||||
@@ -6,7 +6,11 @@ from struct import unpack
|
||||
from typing import Optional
|
||||
import hashlib
|
||||
|
||||
from Crypto.Cipher import ARC4, DES, AES
|
||||
try:
|
||||
from Crypto.Cipher import ARC4, DES, AES
|
||||
except ImportError:
|
||||
# Debian/Ubuntu ship pycryptodome under Cryptodome namespace
|
||||
from Cryptodome.Cipher import ARC4, DES, AES
|
||||
|
||||
from volatility3.framework import interfaces, renderers, exceptions
|
||||
from volatility3.framework.configuration import requirements
|
||||
|
||||
Reference in New Issue
Block a user