Xavier Marichal

22 papers A* 1B 1C 1Misc 1Journal 6Unranked 12
YearRankTypeTitle / Venue / Authors
2008 J jnl
Multim. Tools Appl.
Pedro Correa, Ferran Marqués, Xavier Marichal, Benoît Macq
2007 J jnl
IEEE Trans. Multim.
P. C. Correa Hernandez, Jacek Czyz, Ferran Marqués, Toshiyuki Umeda, Xavier Marichal, Benoît Macq
2005 conf
ICIP (3)
Pedro Correa, Jacek Czyz, Toshiyuki Umeda, Ferran Marqués, Xavier Marichal, Benoît Macq
2004 conf
Advances in Computer Entertainment Technology
Fred Charles, Marc Cavazza, Steven J. Mead, Olivier Martin, Alok Nandi, Xavier Marichal
2004 J jnl
IEEE Multim.
Marc Cavazza, Fred Charles, Steven J. Mead, Olivier Martin, Xavier Marichal, Alok Nandi
2004 J jnl
IEEE Trans. Image Process.
Paulo Villegas, Xavier Marichal
2003 B conf
IVA
Marc Cavazza, Olivier Martin, Fred Charles, Steven J. Mead, Xavier Marichal
2003 conf
International Conference on Virtual Storytelling
Alok Nandi, Xavier Marichal
2003 C conf
VCIP
Xavier Marichal, Toshiyuki Umeda
2003 A* conf
ISMAR
Marc Cavazza, Olivier Martin, Fred Charles, Xavier Marichal, Steven J. Mead
2003 conf
International Conference on Virtual Storytelling
Marc Cavazza, Olivier Martin, Fred Charles, Steven J. Mead, Xavier Marichal
2002 conf
IWEC
Alok Nandi, Xavier Marichal
2001 J jnl
Signal Process. Image Commun.
F. Vermaut, Yannick Deville, Xavier Marichal, Benoît Macq
2001 conf
International Conference on Virtual Storytelling
Alok Nandi, Xavier Marichal
2000 conf
EUSIPCO
Xavier Marichal, Paulo Villegas
1999 conf
ICIP (2)
Xavier Marichal, Wei-Ying Ma, HongJiang Zhang
1998 conf
EUSIPCO
F. Vermaut, Yannick Deville, Benoît Macq, Xavier Marichal
1998 Misc conf
ICASSP
Xavier Marichal, Benoît Macq
1997 J jnl
Signal Process. Image Commun.
Christophe De Vleeschouwer, Thierry Delmot, Xavier Marichal, Benoît Macq
1997 conf
Human Vision and Electronic Imaging
Christophe De Vleeschouwer, Xavier Marichal, Thierry Delmot, Benoît Macq
1996 conf
ICIP (3)
Xavier Marichal, Benoît Macq
1996 conf
ICIP (3)
Xavier Marichal, Thierry Delmot, Christophe De Vleeschouwer, Vincent Warscotte, Benoît Macq
redb/extractors/apk_extractor.py
← Index redb/extractors/apk_extractor.py python
import logging
import zipfile
from abc import ABCMeta, abstractmethod

from redb.extractors.extractor import Extractor

logger = logging.getLogger(__name__)


@abstractmethod
class APKExtractor(Extractor, metaclass=ABCMeta):

    def __init__(
        self,
        filepath,
        log,
        exporters=None,
        index_prefix=None,
        known_benign=False,
        known_malicious=False,
        apk=None,
    ):
        # Read binary data before calling super().__init__ so that the
        # binary property override is available during hash computation.
        with open(filepath, "rb") as f:
            self._binary_data = f.read()

        self.apk = apk if apk else self._generate_apk_object(filepath)

        super().__init__(
            filepath,
            log,
            exporters,
            index_prefix,
            known_benign=known_benign,
            known_malicious=known_malicious,
        )

    @property
    def binary(self):
        """Override to use already-read binary data."""
        return self._binary_data

    def _generate_apk_object(self, filepath):
        """Parse APK using androguard."""
        apk = None
        try:
            # Suppress verbose androguard loguru DEBUG/INFO output
            from loguru import logger as loguru_logger
            loguru_logger.disable("androguard")
            from androguard.core.apk import APK
            apk = APK(filepath)
            if not apk.is_valid_APK():
                logger.warning(
                    f"APK validation warning for {filepath}"
                )
                # Still return the object — partial parsing may still work
        except Exception as e:
            logger.error(
                f"Format error parsing APK {filepath}: {e}"
            )
        return apk

    def _is_valid_apk(self):
        """Check if the APK object was parsed successfully."""
        return self.apk is not None

    def _get_zip_file(self):
        """Get a zipfile.ZipFile handle for direct archive inspection."""
        try:
            return zipfile.ZipFile(self.filepath, 'r')
        except (zipfile.BadZipFile, Exception) as e:
            self.log.error(f"Failed to open APK as ZIP: {e}")
            return None

    def _list_files(self):
        """List all files in the APK archive."""
        if not self._is_valid_apk():
            return []
        try:
            return self.apk.get_files()
        except Exception as e:
            self.log.error(f"Error listing APK files: {e}")
            return []