mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-07 18:27:39 +02:00
Changing requirements + formating
This commit is contained in:
+2
-2
@@ -18,5 +18,5 @@ pycryptodome
|
||||
leechcorepyc>=2.4.0
|
||||
|
||||
# This is required for memory analysis on a Amazon/MinIO S3 and Google Cloud object storage
|
||||
gcsfs>=2023.6.0
|
||||
s3fs>=2023.6.0
|
||||
gcsfs>=2023.1.0
|
||||
s3fs>=2023.1.0
|
||||
@@ -23,35 +23,33 @@ from volatility3.framework.layers import resources
|
||||
|
||||
vollog = logging.getLogger(__file__)
|
||||
|
||||
class S3FileSystemHandler(resources.VolatilityHandler):
|
||||
if HAS_S3FS:
|
||||
@classmethod
|
||||
def non_cached_schemes(cls) -> List[str]:
|
||||
return ["s3"]
|
||||
if HAS_S3FS:
|
||||
|
||||
@staticmethod
|
||||
def default_open(req: urllib.request.Request) -> Optional[Any]:
|
||||
"""Handles the request if it's the s3 scheme."""
|
||||
if req.type == "s3":
|
||||
object_uri = "://".join(req.full_url.split("://")[1:])
|
||||
return s3fs.S3FileSystem().open(object_uri)
|
||||
return None
|
||||
else:
|
||||
raise exceptions.LayerException("s3 requirement is missing.")
|
||||
class S3FileSystemHandler(resources.VolatilityHandler):
|
||||
|
||||
@classmethod
|
||||
def non_cached_schemes(cls) -> List[str]:
|
||||
return ["s3"]
|
||||
|
||||
@staticmethod
|
||||
def default_open(req: urllib.request.Request) -> Optional[Any]:
|
||||
"""Handles the request if it's the s3 scheme."""
|
||||
if req.type == "s3":
|
||||
object_uri = "://".join(req.full_url.split("://")[1:])
|
||||
return s3fs.S3FileSystem().open(object_uri)
|
||||
return None
|
||||
|
||||
class GSFileSystemHandler(resources.VolatilityHandler):
|
||||
if HAS_GCSFS:
|
||||
@classmethod
|
||||
def non_cached_schemes(cls) -> List[str]:
|
||||
return ["gs"]
|
||||
|
||||
@staticmethod
|
||||
def default_open(req: urllib.request.Request) -> Optional[Any]:
|
||||
"""Handles the request if it's the gs scheme."""
|
||||
if req.type == "gs":
|
||||
object_uri = "://".join(req.full_url.split("://")[1:])
|
||||
return gcsfs.GCSFileSystem().open(object_uri)
|
||||
return None
|
||||
else:
|
||||
raise exceptions.LayerException("gcsfs requirement is missing.")
|
||||
if HAS_GCSFS:
|
||||
|
||||
class GSFileSystemHandler(resources.VolatilityHandler):
|
||||
@classmethod
|
||||
def non_cached_schemes(cls) -> List[str]:
|
||||
return ["gs"]
|
||||
|
||||
@staticmethod
|
||||
def default_open(req: urllib.request.Request) -> Optional[Any]:
|
||||
"""Handles the request if it's the gs scheme."""
|
||||
if req.type == "gs":
|
||||
object_uri = "://".join(req.full_url.split("://")[1:])
|
||||
return gcsfs.GCSFileSystem().open(object_uri)
|
||||
return None
|
||||
Reference in New Issue
Block a user