Ian D. Peake

27 papers B 5C 4Journal 5Unranked 13
YearRankTypeTitle / Venue / Authors
2018 J jnl
CoRR
Jan Olaf Blech, Ian D. Peake, Sudarsan S. D.
2017 J jnl
CoRR
Ian D. Peake, Jan Olaf Blech, Shyam Nath, Jacob Jacky Aharon, Argyll McGhie
2016 C conf
ETFA
Ian D. Peake, Jan Olaf Blech, Matthew Schembri
2016 conf
AVR (1)
Ian D. Peake, Jan Olaf Blech, Edward Watkins, Stefan Greuter, Heinz W. Schmidt
2015 conf
ASWEC (2)
Jan Olaf Blech, Ian D. Peake, Gwyllim Jahn, Roland Snooks
2015 conf
FMSPLE
Ian D. Peake, Jan Olaf Blech, Lasith Fernando, Divyasheel Sharma, Srini Ramaswamy, Mallikarjun Kande
2015 B conf
ICPADS
Ian D. Peake, Abhijay Vuyyuru, Jan Olaf Blech, Nicolas Vergnaud, Lasith Fernando
2015 C conf
ETFA
Jan Olaf Blech, Ian D. Peake, Heinz W. Schmidt, Mallikarjun Kande, Akilur Rahman, Srini Ramaswamy, Sithu D. Sudarsan, Venkateswaran Narayanan
2015 J jnl
CoRR
Ian D. Peake, Jan Olaf Blech, Ian E. Thomas, Nicholas R. May, Heinz W. Schmidt, Lasith Fernando, Ravi Sreenivasamurthy
2015 B conf
ENASE
Jan Olaf Blech, Peter Herrmann, Ian D. Peake, Heinz W. Schmidt
2015 C conf
ETFA
Ian D. Peake, Jan Olaf Blech, Lasith Fernando, Heinz W. Schmidt, Ravi Sreenivasamurthy, Sithu D. Sudarsan
2014 C conf
ETFA
Jan Olaf Blech, Ian D. Peake, Heinz W. Schmidt, Mallikarjun Kande, Srini Ramaswamy, Sithu D. Sudarsan, Venkateswaran Narayanan
2014 J jnl
CoRR
Jan Olaf Blech, Maria Spichkova, Ian D. Peake, Heinz W. Schmidt
2014 B conf
ENASE
Jan Olaf Blech, Maria Spichkova, Ian D. Peake, Heinz W. Schmidt
2014 J jnl
CoRR
Maria Spichkova, Heinz W. Schmidt, Ian D. Peake
2013 conf
EESSMod@MoDELS
Ian D. Peake, Jan Olaf Blech, Lasith Fernando
2013 conf
QoSA
Terry G. Zhou, Ian D. Peake, Heinz W. Schmidt
2011 conf
QoSA/ISARCS
Iman I. Yusuf, Heinz W. Schmidt, Ian D. Peake
2011 conf
AuCC
Ki Chun Ng, Liuping Wang, Ian D. Peake
2011 conf
QoSA/ISARCS
Ian D. Peake, Heinz W. Schmidt
2010 conf
ICSM
Amir Aryani, Ian D. Peake, Margaret Hamilton
2009 conf
Australian Software Engineering Conference
Amir Aryani, Ian D. Peake, Margaret Hamilton, Heinz W. Schmidt, Michael Winikoff
2009 conf
ESEC/SIGSOFT FSE
Iman I. Yusuf, Heinz W. Schmidt, Ian D. Peake
2007 conf
SOFSEM (1)
Ian D. Peake, Heinz W. Schmidt
2006 B conf
EDOC
Susan Entwisle, Heinz W. Schmidt, Ian D. Peake, Elizabeth A. Kendall
2005 B conf
e-Science
Mohammad Tanvir Huda, Heinz W. Schmidt, Ian D. Peake
2003 conf
WORDS Fall
Heinz W. Schmidt, Ian D. Peake, Jue Xie, Ian E. Thomas, Bernd J. Krämer, Alexander Fay, Peter Bort
redb/extractor_registry.py
← Index redb/extractor_registry.py python
"""
Extractor registry with lazy loading by file type.

Groups extractors by file type (pe, elf, macho, apk) and only imports
the relevant group when that file type is first encountered. This avoids
loading heavy dependencies (pefile, lief, androguard, etc.) into workers
that don't need them.
"""
import importlib
import logging

logger = logging.getLogger(__name__)

# Registry: group name -> list of (module_path, class_names)
_REGISTRY = {
    "pe": [
        ("redb.extractors.pe_extractors", [
            "PEFeaturesExtractor",
            "PEImportExtractor",
            "PEResourceExtractor",
            "PEOverlayExtractor",
            "PESectionExtractor",
            "PESignatureExtractor",
            "PEExtraFindings",
            "PEInconstistencyTestsExtractor",
            "PEDotNetExtractor",
        ]),
    ],
    "elf": [
        ("redb.extractors.elf_extractors", [
            "ELFFeaturesExtractor",
            "ELFSegmentExtractor",
            "ELFSectionExtractor",
            "ELFDependencyExtractor",
            "ELFSymbolExtractor",
            "ELFImportExtractor",
            "ELFExportExtractor",
            "ELFRelocationExtractor",
            "ELFNotesExtractor",
        ]),
    ],
    "macho": [
        ("redb.extractors.macho_extractors", [
            "MachOFeaturesExtractor",
            "MachOSegmentExtractor",
            "MachOImportExtractor",
            "MachOExportExtractor",
            "MachODylibExtractor",
            "MachOSignatureExtractor",
        ]),
    ],
    "apk": [
        ("redb.extractors.apk_extractors", [
            "APKFeaturesExtractor",
            "APKManifestExtractor",
            "APKPermissionsExtractor",
            "APKSignatureExtractor",
            "APKDexExtractor",
            "APKResourceExtractor",
            "APKNativeLibExtractor",
            "APKInconsistencyTestsExtractor",
        ]),
        ("redb.extractors.decompiler.DecompileAPK", [
            "DecompileAPK",
        ]),
    ],
    "js": [
        ("redb.extractors.js_extractors", [
            "JSFeaturesExtractor",
            "JSSuspiciousAPIsExtractor",
            "JSStringsExtractor",
            "JSDeobfuscationExtractor",
            "JSContentExtractor",
        ]),
    ],
}

# Map filetype labels (from Magika) to registry group names
FILETYPE_TO_GROUP = {
    "pebin": "pe",
    "elf": "elf",
    "macho": "macho",
    "apk": "apk",
    "javascript": "js",
}

# Cache: group name -> {class_name: class}
_group_cache = {}


def _load_group(group_name):
    """Import all extractors for a group. Cached after first call."""
    if group_name in _group_cache:
        return _group_cache[group_name]

    logger.debug(f"Loading extractor group: {group_name}")

    # Suppress androguard logging before importing APK extractors
    if group_name == "apk":
        from loguru import logger as loguru_logger
        loguru_logger.disable("androguard")

    classes = {}
    for module_path, class_names in _REGISTRY[group_name]:
        mod = importlib.import_module(module_path)
        for name in class_names:
            classes[name] = getattr(mod, name)

    _group_cache[group_name] = classes
    return classes


def get_filetype_modules(filetype):
    """Get the list of format-specific extractor classes for a filetype.

    Returns only analysis extractors (excludes decompilers like DecompileAPK).
    """
    group = FILETYPE_TO_GROUP.get(filetype)
    if not group:
        return []
    classes = _load_group(group)
    return [cls for name, cls in classes.items() if not name.startswith("Decompile")]


def get_extractor_class(name):
    """Look up a single extractor class by name across all groups.

    Checks cached groups first, then loads groups on demand.
    """
    # Check already-loaded groups first
    for group_classes in _group_cache.values():
        if name in group_classes:
            return group_classes[name]

    # Search all groups (triggers lazy loading)
    for group_name in _REGISTRY:
        classes = _load_group(group_name)
        if name in classes:
            return classes[name]

    return None