Oleg S. Pianykh

24 papers Journal 17Unranked 6
YearRankTypeTitle / Venue / Authors
2024 J jnl
Eur. J. Oper. Res.
Oleg S. Pianykh, Sebastian Perez, Chengzhao Richard Zhang
2020 conf
MICCAI (2)
Johannes Hofmanninger, Matthias Perkonigg, James A. Brink, Oleg S. Pianykh, Christian Herold, Georg Langs
2020 J jnl
CoRR
Johannes Hofmanninger, Matthias Perkonigg, James A. Brink, Oleg S. Pianykh, Christian Herold, Georg Langs
2020 J jnl
Nat. Mach. Intell.
Oleg S. Pianykh, Steven Guitron, Darren Parke, Chengzhao Richard Zhang, Pari Pandharipande, James Brink, Daniel Rosenthal
2018 J jnl
J. Digit. Imaging
Oleg S. Pianykh, Ksenia Pospelova, Nick H. Kamboj
2017 ed.
WDAM
Oleg S. Pianykh, Alexey Neznanov, Sergei O. Kuznetsov, Jaume Baixeries, Svetla Boytcheva
2015 J jnl
J. Digit. Imaging
Catherine Oglevee, Oleg S. Pianykh
2012 J jnl
IEEE Trans. Signal Process.
Oleg S. Pianykh
2012 J jnl
Comput. Medical Imaging Graph.
Oleg S. Pianykh
2011 J jnl
CoRR
Oleg S. Pianykh
2010 J jnl
CoRR
Oleg S. Pianykh
2010 J jnl
CoRR
Oleg S. Pianykh
2010 J jnl
CoRR
Oleg S. Pianykh
2006 J jnl
Pattern Recognit.
Oleg S. Pianykh
2006 conf
ACM Southeast Regional Conference
Monica Trifas, John M. Tyler, Oleg S. Pianykh
2006 conf
Human Vision and Electronic Imaging
Monica Trifas, John M. Tyler, Oleg S. Pianykh
2005 J jnl
J. Assoc. Inf. Sci. Technol.
Nathan E. Brener, S. Sitharama Iyengar, Oleg S. Pianykh
2005 conf
VISION
Monica Trifas, John M. Tyler, Oleg S. Pianykh
2005 conf
VISION
Rahman Mitchel Tashakkori, John M. Tyler, Oleg S. Pianykh
2004 conf
CISST
Rahman Mitchel Tashakkori, John M. Tyler, Oleg S. Pianykh, Xiaojun Qi
2001 J jnl
IEEE Trans. Image Process.
Oleg S. Pianykh, John M. Tyler
2000 J jnl
Pattern Recognit. Lett.
Raj Sharman, John M. Tyler, Oleg S. Pianykh
1999 J jnl
Pattern Recognit. Lett.
Oleg S. Pianykh, John M. Tyler, Raj Sharman
1998 J jnl
Comput. Graph.
Oleg S. Pianykh, John M. Tyler, Warren N. Waggenspack Jr.
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 []