Rajesh Chandwani

20 papers A* 3C 3Journal 11Unranked 3
YearRankTypeTitle / Venue / Authors
2026 J jnl
Inf. Syst. Frontiers
Rajesh Chandwani, Rahul De', Yogesh K. Dwivedi
2025 J jnl
Commun. Assoc. Inf. Syst.
Ritu Raj, Rajesh Chandwani
2023 C conf
ICIS
Mayank Kumar, Sundeep Sahay, Arunima Sehgal Mukherjee, Rajesh Chandwani
2022 J jnl
Inf. Syst. J.
Mayank Kumar, Jang Bahadur Singh, Rajesh Chandwani, Agam Gupta
2021 J jnl
J. Knowl. Manag.
Bhawana Maheshwari, Miguel Sarrion, Manoj Motiani, Siobhan O'Sullivan, Rajesh Chandwani
2021 J jnl
J. Knowl. Manag.
Vijay Pereira, Cary L. Cooper, Rajesh Chandwani, Arup Varma, Shlomo Yedidia Y. Tarba
2021 J jnl
J. Knowl. Manag.
Judith Fletcher-Brown, Diane Carter, Vijay Pereira, Rajesh Chandwani
2020 J jnl
Int. J. Inf. Manag.
Mayank Kumar, Jang Bahadur Singh, Rajesh Chandwani, Agam Gupta
2020 conf
AMCIS
Jang Bahadur Singh, M. Vimal Kumar, Rajesh Chandwani, Biju Varkkey
2019 C conf
ICTD
Neha Kumar, Rajesh Chandwani, Julie A. Kientz
2019 C ed.
ICTD
Rajesh Chandwani, Pushpendra Singh, Neha Kumar, Rajesh Veeraraghavan
2019 J jnl
Proc. ACM Hum. Comput. Interact.
Neha Kumar, Azra Ismail, Samyukta Manjayya Sherugar, Rajesh Chandwani
2018 J jnl
J. Knowl. Manag.
Jang Bahadur Singh, Rajesh Chandwani, Mayank Kumar
2018 A* conf
CHI
Rajesh Chandwani, Neha Kumar
2017 J jnl
Inf. Syst. Frontiers
Rajesh Chandwani, Rahul De'
2017 A* conf
CHI
Jasmine Hentschel, Samyukta Manjayya Sherugar, Rui Zhou, Vaishnav Kameswaran, Rajesh Chandwani, Neha Kumar
2016 A* conf
CHI
Rajesh Chandwani, Vaibhavi Kulkarni
2015 J jnl
Electron. J. Inf. Syst. Dev. Ctries.
Rajesh Chandwani, Rahul De'
2014 conf
ECIS
Jang Bahadur Singh, Rajesh Chandwani
2013 conf
ICTD (2)
Rajesh Chandwani, Rahul De'
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