Iosif I. Vaisman

28 papers C 1Misc 1Journal 9Unranked 17
YearRankTypeTitle / Venue / Authors
2021 J jnl
J. Chem. Inf. Model.
Srilatha Sakamuru, Jinghua Zhao, Menghang Xia, Huixiao Hong, Anton Simeonov, Iosif I. Vaisman, Ruili Huang
2019 J jnl
F1000Research
Mauricio Oberti, Iosif I. Vaisman
2018 conf
BCB
Manal Othman, Sujay Ratna, Anant Tewari, Anthony M. Kang, Iosif I. Vaisman
2017 conf
BCB
Manal Othman, Sujay Ratna, Anant Tewari, Anthony M. Kang, Katherine Du, Iosif I. Vaisman
2017 conf
BCB
Mauricio Oberti, Iosif I. Vaisman
2017 conf
BCB
Uday Yallapragada, Iosif I. Vaisman
2014 J jnl
Adv. Bioinformatics
Majid Masso, Iosif I. Vaisman
2011 conf
EMBC
Majid Masso, Iosif I. Vaisman
2011 conf
BIOINFORMATICS
Majid Masso, Iosif I. Vaisman
2011 conf
EMBC
Majid Masso, Iosif I. Vaisman
2010 J jnl
BMC Bioinform.
Majid Masso, Iosif I. Vaisman
2009 conf
ICCS (2)
Shujiang Yang, Mohammed Lach-hab, Iosif I. Vaisman, Estela Blaisten-Barojas
2009 conf
BIBM
Majid Masso, Tariq Alsheddi, Iosif I. Vaisman
2009 Misc conf
IC-AI
Shujiang Yang, Mohammed Lach-hab, Iosif I. Vaisman, Estela Blaisten-Barojas
2008 J jnl
Bioinform.
Majid Masso, Iosif I. Vaisman
2008 conf
ISBRA
Majid Masso, Kahkeshan Hijazi, Nida Parvez, Iosif I. Vaisman
2008 conf
DMIN
Shujiang Yang, Mohammed Lach-hab, Iosif I. Vaisman, Estela Blaisten-Barojas
2008 conf
BIBM
Majid Masso, Ewy A. Mathé, Nida Parvez, Kahkeshan Hijazi, Iosif I. Vaisman
2007 C conf
BIBE
Majid Masso, Iosif I. Vaisman
2007 J jnl
Bioinform.
Majid Masso, Iosif I. Vaisman
2007 conf
ISVD
Gregory M. Reck, Iosif I. Vaisman
2007 conf
ISVD
Todd J. Taylor, Iosif I. Vaisman
2006 conf
ISVD
Todd J. Taylor, Iosif I. Vaisman
2006 conf
ISVD
Todd J. Taylor, Iosif I. Vaisman
2004 conf
CSB
Todd J. Taylor, Iosif I. Vaisman
1999 J jnl
Bioinform.
Oleg Shats, Iosif I. Vaisman, A. Shats, Simon Sherman
1996 J jnl
J. Comput. Biol.
Raj K. Singh, Alexander Tropsha, Iosif I. Vaisman
1995 J jnl
Comput. Appl. Biosci.
D. L. Hoffman, S. Laiter, Raj K. Singh, Iosif I. Vaisman, Alexander Tropsha
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 []