Ramakrishna R. Nemani

75 papers A* 6A 1B 3C 4Misc 2Journal 52Unranked 7
YearRankTypeTitle / Venue / Authors
2023 J jnl
IEEE Trans. Neural Networks Learn. Syst.
Kate Duffy, Thomas J. Vandal, Weile Wang, Ramakrishna R. Nemani, Auroop R. Ganguly
2023 J jnl
IEEE Trans. Neural Networks Learn. Syst.
Thomas J. Vandal, Ramakrishna R. Nemani
2022 J jnl
Remote. Sens.
Weile Wang, Yujie Wang, Alexei I. Lyapustin, Hirofumi Hashimoto, Taejin Park, Andrew R. Michaelis, Ramakrishna R. Nemani
2022 A* conf
KDD
Thomas J. Vandal, Kate Duffy, Will McCarty, Akira Sewnath, Ramakrishna R. Nemani
2022 conf
GECCO Companion
Subodh Kalia, Chilukuri K. Mohan, Ramakrishna R. Nemani
2022 J jnl
IEEE Access
Kate Duffy, Thomas J. Vandal, Ramakrishna R. Nemani
2022 J jnl
IEEE Trans. Geosci. Remote. Sens.
Thomas Vandal, Daniel McDuff, Weile Wang, Kate Duffy, Andrew R. Michaelis, Ramakrishna R. Nemani
2021 J jnl
IEEE J. Sel. Top. Appl. Earth Obs. Remote. Sens.
Yepei Chen, Kaimin Sun, Wenzhuo Li, Chi Chen, Pengfei Li, Ting Bai, Taejin Park, Weile Wang, Ramakrishna R. Nemani, Ranga B. Myneni
2020 J jnl
Remote. Sens.
Weile Wang, Shuang Li, Hirofumi Hashimoto, Hideaki Takenaka, Atsushi Higuchi, Satya Kalluri, Ramakrishna R. Nemani
2020 J jnl
Remote. Sens.
Vesta Afzali Gorooh, Subodh Kalia, Phu Nguyen, Kuo-lin Hsu, Soroosh Sorooshian, Sangram Ganguly, Ramakrishna R. Nemani
2020 C conf
IGARSS
Ramakrishna R. Nemani, Weile Wang, Hirofumi Hashimoto, Andrew R. Michaelis, Thomas Vandal, Alexei I. Lyapustin, Jia Zhang, Tsengdar J. Lee, Satya Kalluri, Hideaki Takenaka, Atsushi Higuchi, Kazuhito Ichii, Shuang Li, Jong-Min Yeom
2020 A* conf
KDD
Nicholas Gao, Max Wilson, Thomas Vandal, Walter Vinci, Ramakrishna R. Nemani, Eleanor Gilbert Rieffel
2020 J jnl
CoRR
Nicholas Gao, Max Wilson, Thomas Vandal, Walter Vinci, Ramakrishna R. Nemani, Eleanor Gilbert Rieffel
2020 C conf
IGARSS
Hirofumi Hashimoto, Weile Wang, Andrew R. Michaelis, Hideaki Takenaka, Atsushi Higuchi, Ramakrishna R. Nemani
2020 J jnl
CoRR
Thomas Vandal, Daniel McDuff, Weile Wang, Andrew R. Michaelis, Ramakrishna R. Nemani
2019 J jnl
Remote. Sens.
Negin Hayatbini, Bailey Kong, Kuo-lin Hsu, Phu Nguyen, Soroosh Sorooshian, Graeme Stephens, Charless C. Fowlkes, Ramakrishna R. Nemani
2019 J jnl
CoRR
Kate Duffy, Thomas Vandal, Weile Wang, Ramakrishna R. Nemani, Auroop R. Ganguly
2019 J jnl
Frontiers Big Data
Kate Duffy, Thomas Vandal, Shuang Li, Sangram Ganguly, Ramakrishna R. Nemani, Auroop R. Ganguly
2019 J jnl
CoRR
Qun Liu, Saikat Basu, Sangram Ganguly, Supratik Mukhopadhyay, Robert DiBiano, Manohar Karki, Ramakrishna R. Nemani
2019 A* conf
KDD
Ramakrishna R. Nemani
2019 J jnl
Remote. Sens.
Shuang Li, Weile Wang, Hirofumi Hashimoto, Jun Xiong, Thomas Vandal, Jing Yao, Lexiang Qian, Kazuhito Ichii, Alexei I. Lyapustin, Yujie Wang, Ramakrishna R. Nemani
2019 J jnl
Remote. Sens.
Yepei Chen, Kaimin Sun, Chi Chen, Ting Bai, Taejin Park, Weile Wang, Ramakrishna R. Nemani, Ranga B. Myneni
2019 J jnl
Remote. Sens.
Dawn Emil Sebastian, Sangram Ganguly, Jagdish Krishnaswamy, Kate Duffy, Ramakrishna R. Nemani, Subimal Ghosh
2019 J jnl
CoRR
Thomas Vandal, Ramakrishna R. Nemani
2019 J jnl
CoRR
Edward Collier, Kate Duffy, Sangram Ganguly, Geri Madanguit, Subodh Kalia, Shreekant Gayaka, Ramakrishna R. Nemani, Andrew R. Michaelis, Shuang Li, Auroop R. Ganguly, Supratik Mukhopadhyay
2018 J jnl
Remote. Sens.
Weile Wang, Ramakrishna R. Nemani, Hirofumi Hashimoto, Sangram Ganguly, Dong Huang, Yuri Knyazikhin, Ranga B. Myneni, Govindasamy Bala
2018 J jnl
Neural Networks
Saikat Basu, Supratik Mukhopadhyay, Manohar Karki, Robert DiBiano, Sangram Ganguly, Ramakrishna R. Nemani, Shreekant Gayaka
2018 A* conf
IJCAI
Thomas Vandal, Evan Kodra, Sangram Ganguly, Andrew R. Michaelis, Ramakrishna R. Nemani, Auroop R. Ganguly
2018 J jnl
Remote. Sens.
Varun Mithal, Guruprasad Nayak, Ankush Khandelwal, Vipin Kumar, Ramakrishna R. Nemani, Nikunj C. Oza
2018 conf
ICDM Workshops
Edward Collier, Kate Duffy, Sangram Ganguly, Geri Madanguit, Subodh Kalia, Shreekant Gayaka, Ramakrishna R. Nemani, Andrew R. Michaelis, Shuang Li, Auroop R. Ganguly, Supratik Mukhopadhyay
2018 A* conf
KDD
Thomas Vandal, Evan Kodra, Jennifer G. Dy, Sangram Ganguly, Ramakrishna R. Nemani, Auroop R. Ganguly
2018 J jnl
CoRR
Thomas Vandal, Evan Kodra, Jennifer G. Dy, Sangram Ganguly, Ramakrishna R. Nemani, Auroop R. Ganguly
2018 A conf
ICSOC
Jia Zhang, Maryam Pourreza, Seungwon Lee, Ramakrishna R. Nemani, Tsengdar J. Lee
2017 A* conf
KDD
Thomas Vandal, Evan Kodra, Sangram Ganguly, Andrew R. Michaelis, Ramakrishna R. Nemani, Auroop R. Ganguly
2017 J jnl
CoRR
Thomas Vandal, Evan Kodra, Sangram Ganguly, Andrew R. Michaelis, Ramakrishna R. Nemani, Auroop R. Ganguly
2017 J jnl
Remote. Sens.
Uttam Kumar, Sangram Ganguly, Ramakrishna R. Nemani, S. Kumar Raja, Cristina Milesi, Ruchita Sinha, Andrew R. Michaelis, Petr Votava, Hirofumi Hashimoto, Shuang Li, Weile Wang, Subodh Kalia, Shreekant Gayaka
2017 J jnl
Neural Process. Lett.
Saikat Basu, Manohar Karki, Sangram Ganguly, Robert DiBiano, Supratik Mukhopadhyay, Shreekant Gayaka, Rajgopal Kannan, Ramakrishna R. Nemani
2017 J jnl
IEEE Trans. Knowl. Data Eng.
Varun Mithal, Guruprasad Nayak, Ankush Khandelwal, Vipin Kumar, Nikunj C. Oza, Ramakrishna R. Nemani
2016 J jnl
CoRR
Saikat Basu, Manohar Karki, Robert DiBiano, Supratik Mukhopadhyay, Sangram Ganguly, Ramakrishna R. Nemani, Shreekant Gayaka
2016 B conf
IJCNN
Saikat Basu, Manohar Karki, Supratik Mukhopadhyay, Sangram Ganguly, Ramakrishna R. Nemani, Robert DiBiano, Shreekant Gayaka
2016 J jnl
Remote. Sens.
Kai Yan, Taejin Park, Guangjian Yan, Chi Chen, Bin Yang, Zhao Liu, Ramakrishna R. Nemani, Yuri Knyazikhin, Ranga B. Myneni
2016 J jnl
Remote. Sens.
Kai Yan, Taejin Park, Guangjian Yan, Zhao Liu, Bin Yang, Chi Chen, Ramakrishna R. Nemani, Yuri Knyazikhin, Ranga B. Myneni
2015 J jnl
IEEE Trans. Geosci. Remote. Sens.
Saikat Basu, Sangram Ganguly, Ramakrishna R. Nemani, Supratik Mukhopadhyay, Gong Zhang, Cristina Milesi, Andrew R. Michaelis, Petr Votava, Ralph Dubayah, Laura Duncanson, Bruce D. Cook, Yifan Yu, Sassan Saatchi, Robert DiBiano, Manohar Karki, Edward Boyda, Uttam Kumar, Shuang Li
2015 J jnl
Int. J. Web Serv. Res.
Jia Zhang, Chris Lee, Petr Votava, Tsengdar J. Lee, Shuai Wang, Venkatesh Sriram, Neeraj Saini, Pujita Rao, Ramakrishna R. Nemani
2015 J jnl
Int. J. Bus. Process. Integr. Manag.
Jia Zhang, Chris Lee, Petr Votava, Tsengdar J. Lee, Ramakrishna R. Nemani, Ian T. Foster
2015 J jnl
CoRR
Saikat Basu, Sangram Ganguly, Supratik Mukhopadhyay, Robert DiBiano, Manohar Karki, Ramakrishna R. Nemani
2015 conf
SIGSPATIAL/GIS
Saikat Basu, Sangram Ganguly, Supratik Mukhopadhyay, Robert DiBiano, Manohar Karki, Ramakrishna R. Nemani
2015 B conf
ESANN
Saikat Basu, Manohar Karki, Sangram Ganguly, Robert DiBiano, Supratik Mukhopadhyay, Ramakrishna R. Nemani
2015 J jnl
CoRR
Saikat Basu, Manohar Karki, Sangram Ganguly, Robert DiBiano, Supratik Mukhopadhyay, Ramakrishna R. Nemani
2015 Misc conf
IRI
Uttam Kumar, Cristina Milesi, Sangram Ganguly, S. Kumar Raja, Ramakrishna R. Nemani
2015 Misc conf
IRI
Uttam Kumar, Cristina Milesi, S. Kumar Raja, Sangram Ganguly, Ramakrishna R. Nemani
2014 conf
SOSE
Jia Zhang, Chris Lee, Sean Xiao, Petr Votava, Tsengdar J. Lee, Ramakrishna R. Nemani, Ian T. Foster
2013 conf
IEEE SCC
Jia Zhang, Petr Votava, Tsengdar J. Lee, Shrikant Adhikarla, Isaraporn Cherry Kulkumjon, Matthew Schlau, Divya Natesan, Ramakrishna R. Nemani
2013 J jnl
Remote. Sens.
Yuli Shi, Sungho Choi, Xiliang Ni, Sangram Ganguly, Gong Zhang, Hieu V. Duong, Michael A. Lefsky, Marc Simard, Sassan S. Saatchi, Shihyan Lee, Wenge Ni-Meister, Shilong Piao, Chunxiang Cao, Ramakrishna R. Nemani, Ranga B. Myneni
2013 J jnl
Remote. Sens.
Sungho Choi, Xiliang Ni, Yuli Shi, Sangram Ganguly, Gong Zhang, Hieu V. Duong, Michael A. Lefsky, Marc Simard, Sassan S. Saatchi, Shihyan Lee, Wenge Ni-Meister, Shilong Piao, Chunxiang Cao, Ramakrishna R. Nemani, Ranga B. Myneni
2013 B conf
SERVICES
Jia Zhang, Petr Votava, Tsengdar J. Lee, Owen Chu, Clyde Li, David Liu, Kate Liu, Norman Xin, Ramakrishna R. Nemani
2013 J jnl
Remote. Sens.
Zaichun Zhu, Jian Bi, Yaozhong Pan, Sangram Ganguly, Alessandro Anav, Liang Xu, Arindam Samanta, Shilong Piao, Ramakrishna R. Nemani, Ranga B. Myneni
2013 J jnl
Remote. Sens.
Hirofumi Hashimoto, Weile Wang, Cristina Milesi, Jun Xiong, Sangram Ganguly, Zaichun Zhu, Ramakrishna R. Nemani
2013 J jnl
IEEE Trans. Geosci. Remote. Sens.
Jianjun Zhao, Yeqiao Wang, Hirofumi Hashimoto, Forrest S. Melton, Samuel H. Hiatt, Hongyan Zhang, Ramakrishna R. Nemani
2012 J jnl
Remote. Sens.
Hirofumi Hashimoto, Weile Wang, Cristina Milesi, Michael A. White, Sangram Ganguly, Minoru Gamo, Ryuichi Hirata, Ranga B. Myneni, Ramakrishna R. Nemani
2012 J jnl
IEEE J. Sel. Top. Appl. Earth Obs. Remote. Sens.
Eric M. Danner, Forrest S. Melton, Andrew Pike, Hirofumi Hashimoto, Andrew R. Michaelis, Balaji Rajagopalan, Jason Caldwell, Lynn DeWitt, Steven Lindley, Ramakrishna R. Nemani
2012 J jnl
IEEE J. Sel. Top. Appl. Earth Obs. Remote. Sens.
Forrest S. Melton, Lee F. Johnson, Christopher P. Lund, Lars L. Pierce, Andrew R. Michaelis, Samuel H. Hiatt, Alberto Guzman, Diganta D. Adhikari, Adam J. Purdy, Carolyn Rosevelt, Petr Votava, Thomas J. Trout, Bekele Temesgen, Kent Frame, Edwin J. Sheffner, Ramakrishna R. Nemani
2010 conf
WHISPERS
Sangram Ganguly, Ramakrishna R. Nemani, Yuri Knyazikhin, Weile Wang, Hirofumi Hashimoto, Petr Votava, Andrew R. Michaelis, Cristina Milesi, Jennifer L. Dungan, Forrest S. Melton, Ranga B. Myneni
2010 J jnl
Remote. Sens.
Cristina Milesi, Arindam Samanta, Hirofumi Hashimoto, K. Krishna Kumar, Sangram Ganguly, Prasad S. Thenkabail, Ashok N. Srivastava, Ramakrishna R. Nemani, Ranga B. Myneni
2010 C conf
IGARSS
Yeqiao Wang, Ramakrishna R. Nemani, Fred Dieffenbach, Kenneth Stolte, Glenn Holcomb, Matt Robinson, C. Casey Reese, Marcia McNiff, Roland Duhaime, Geri Tierney, Brian Mitche, Peter August, Peter Paton, Charles LaBash
2006 J jnl
IEEE Trans. Geosci. Remote. Sens.
Wenze Yang, Dong Huang, Bin Tan, Julienne C. Stroeve, Nikolay V. Shabanov, Yuri Knyazikhin, Ramakrishna R. Nemani, Ranga B. Myneni
2006 J jnl
IEEE Trans. Geosci. Remote. Sens.
Faith Ann Heinsch, Maosheng Zhao, Steven W. Running, John S. Kimball, Ramakrishna R. Nemani, Kenneth J. Davis, Paul V. Bolstad, Bruce D. Cook, Ankur R. Desai, Daniel M. Ricciuto, Beverly E. Law, Walt C. Oechel, Hyojung Kwon, Hongyan Luo, Steven C. Wofsy, Allison L. Dunn, J. William Munger, Dennis D. Baldocchi, Liukang Xu, David Y. Hollinger, Andrew D. Richardson, Paul C. Stoy, Mario B. S. Siqueira, Russell K. Monson, Sean P. Burns, Lawrence B. Flanagan
2006 J jnl
IEEE Trans. Geosci. Remote. Sens.
Wenze Yang, Bin Tan, Dong Huang, Miina Rautiainen, Nikolay V. Shabanov, Yujie Wang, Jeffrey L. Privette, Karl Fred Huemmrich, Rasmus Fensholt, Inge Sandholt, Marie Weiss, Douglas E. Ahl, Stith T. Gower, Ramakrishna R. Nemani, Yuri Knyazikhin, Ranga B. Myneni
2006 J jnl
IEEE Trans. Geosci. Remote. Sens.
Feihua Yang, Michael A. White, Andrew R. Michaelis, Kazuhito Ichii, Hirofumi Hashimoto, Petr Votava, A-Xing Zhu, Ramakrishna R. Nemani
2005 J jnl
Environ. Model. Softw.
William Matt Jolly, Jonathan M. Graham, Andrew R. Michaelis, Ramakrishna R. Nemani, Steven W. Running
2005 C conf
IGARSS
Smadar Shiffman, Ramakrishna R. Nemani
2003 J jnl
IEEE Trans. Geosci. Remote. Sens.
Kenlo Nishida, Ramakrishna R. Nemani, Joseph Glassy, Steven W. Running
2003 conf
ScanGIS
Petr Votava, Ramakrishna R. Nemani, Keith Golden, Daniel E. Cooke, Hector Hernandez, Changming Ma
1998 J jnl
IEEE Trans. Geosci. Remote. Sens.
Christopher Justice, Eric F. Vermote, John R. Townshend, Ruth S. DeFries, David P. Roy, Dorothy K. Hall, Vincent V. Salomonson, Jeffrey L. Privette, George A. Riggs, Alan H. Strahler, Wolfgang Lucht, Ranga B. Myneni, Yuri Knyazikhin, Steven W. Running, Ramakrishna R. Nemani, Zhengming Wan, Alfredo R. Huete, Wim van Leeuwen, Robert E. Wolfe, Louis Giglio, Jan-Peter Muller, Philip Lewis, Michael J. Barnsley
1997 J jnl
IEEE Trans. Geosci. Remote. Sens.
Ranga B. Myneni, Ramakrishna Ramakrishna, Ramakrishna R. Nemani, Steven W. Running
tests/scripts/test_macho_extractors_local.py
← Index tests/scripts/test_macho_extractors_local.py python
#!/usr/bin/env python3
"""
Local MachO extractors test - test actual extractors without server connections
"""

import sys
import os
import logging
import hashlib
from datetime import datetime, timezone
from typing import Dict, Any, Optional
from unittest.mock import Mock, patch

# Add the redb directory to the path so we can import the extractors
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'redb'))

# Mock settings to avoid database connections
with patch.dict('os.environ', {'REDB_ENV': 'test'}):
    # Import the actual extractors
    from redb.extractors.macho_extractors.macho_features import MachOFeaturesExtractor
    from redb.extractors.macho_extractors.macho_segments import MachOSegmentExtractor
    from redb.extractors.macho_extractors.macho_imports import MachOImportExtractor
    from redb.extractors.macho_extractors.macho_exports import MachOExportExtractor
    from redb.extractors.macho_extractors.macho_dylibs import MachODylibExtractor
    from redb.extractors.macho_extractors.macho_signature import MachOSignatureExtractor
    from redb.extractors.macho_extractors.macho_universal import MachOUniversalExtractor

def setup_logging():
    """Setup basic logging configuration."""
    logging.basicConfig(
        level=logging.INFO,
        format='%(asctime)s - %(levelname)s - %(message)s'
    )
    return logging.getLogger(__name__)

class MockLogger:
    """Mock logger for testing without RedB dependencies."""
    def __init__(self):
        self.logger = logging.getLogger(__name__)
    
    def debug(self, msg):
        self.logger.debug(msg)
    
    def info(self, msg):
        self.logger.info(msg)
    
    def warning(self, msg):
        self.logger.warning(msg)
    
    def error(self, msg):
        self.logger.error(msg)

class MockExporter:
    """Mock exporter that does nothing."""
    def export(self, data):
        pass

def create_mock_extractor(extractor_class, filepath):
    """Create an extractor instance with mocked dependencies."""
    log = MockLogger()
    
    # Mock the exporters to avoid database connections
    mock_exporters = [MockExporter()]
    
    # Create the extractor with mocked dependencies
    extractor = extractor_class(
        filepath=filepath,
        log=log,
        exporters=mock_exporters,
        index_prefix="test",
        elastic_index="test_macho",
        known_benign=False,
        known_malicious=False
    )
    
    return extractor

def test_extractor(extractor_class, filepath, extractor_name):
    """Test a specific extractor."""
    log = setup_logging()
    log.info(f"Testing {extractor_name}...")
    
    try:
        # Create the extractor with mocked dependencies
        extractor = create_mock_extractor(extractor_class, filepath)
        
        if not extractor.macho:
            log.error(f"{extractor_name}: No MachO object created")
            return False

        # Test the actual extract method
        result = extractor.extract()
        
        if result:
            log.info(f"{extractor_name}: Successfully extracted data")
            print(f"\n{'='*60}")
            print(f"=== {extractor_name.upper()} RESULTS ===")
            print(f"{'='*60}")
            
            if isinstance(result, list):
                print(f"📊 Extracted {len(result)} items")
                print()
                for i, item in enumerate(result):
                    print(f"📦 Item {i+1}:")
                    print(f"   {'─'*40}")
                    # Handle dataclass objects in lists
                    if hasattr(item, '__dataclass_fields__'):
                        from dataclasses import asdict
                        item_dict = asdict(item)
                        for key, value in item_dict.items():
                            if isinstance(value, (list, dict)):
                                if isinstance(value, list):
                                    print(f"   🔹 {key}: List with {len(value)} items")
                                    print(f"      {value}")
                                elif isinstance(value, dict):
                                    print(f"   🔹 {key}: Dict with {len(value)} keys")
                                    for k, v in value.items():
                                        print(f"      {k}: {v}")
                            else:
                                print(f"   🔹 {key}: {value}")
                    else:
                        # Regular dict
                        for key, value in item.items():
                            if isinstance(value, (list, dict)):
                                if isinstance(value, list):
                                    print(f"   🔹 {key}: List with {len(value)} items")
                                    print(f"      {value}")
                                elif isinstance(value, dict):
                                    print(f"   🔹 {key}: Dict with {len(value)} keys")
                                    for k, v in value.items():
                                        print(f"      {k}: {v}")
                            else:
                                print(f"   🔹 {key}: {value}")
                    print()
            else:
                print("📊 Extracted data:")
                print()
                # Handle dataclass objects
                if hasattr(result, '__dataclass_fields__'):
                    # It's a dataclass, use dataclasses.asdict
                    from dataclasses import asdict
                    result_dict = asdict(result)
                    for key, value in result_dict.items():
                        if isinstance(value, (list, dict)):
                            if isinstance(value, list):
                                print(f"🔹 {key}: List with {len(value)} items")
                                print(f"   {value}")
                            elif isinstance(value, dict):
                                print(f"🔹 {key}: Dict with {len(value)} keys")
                                for k, v in value.items():
                                    print(f"   {k}: {v}")
                        else:
                            print(f"🔹 {key}: {value}")
                        print()
                else:
                    # It's a regular dict
                    for key, value in result.items():
                        if isinstance(value, (list, dict)):
                            if isinstance(value, list):
                                print(f"🔹 {key}: List with {len(value)} items")
                                print(f"   {value}")
                            elif isinstance(value, dict):
                                print(f"🔹 {key}: Dict with {len(value)} keys")
                                for k, v in value.items():
                                    print(f"   {k}: {v}")
                        else:
                            print(f"🔹 {key}: {value}")
                        print()
        else:
            log.warning(f"{extractor_name}: No data extracted")
            print(f"\n❌ {extractor_name}: No data extracted")
        
        return True
        
    except Exception as e:
        log.error(f"{extractor_name}: Error during extraction: {e}")
        import traceback
        traceback.print_exc()
        return False

def main():
    """Main function."""
    if len(sys.argv) < 2:
        print("Usage: python test_macho_extractors_local.py <macho_file> [extractor_name]")
        print("\nAvailable extractors:")
        print("  features    - Basic MachO header and metadata")
        print("  segments    - Segment information and analysis")
        print("  imports     - Imported functions and libraries")
        print("  exports     - Exported symbols")
        print("  dylibs      - Dynamic library dependencies")
        print("  signature   - Code signing information")
        print("  universal   - FAT/Universal binary information")
        print("  all         - Test all extractors")
        sys.exit(1)
    
    filepath = sys.argv[1]
    extractor_name = sys.argv[2] if len(sys.argv) > 2 else "all"
    
    if not os.path.exists(filepath):
        print(f"File not found: {filepath}")
        sys.exit(1)
    
    # Define extractors
    extractors = {
        'features': (MachOFeaturesExtractor, "MachO Features"),
        'segments': (MachOSegmentExtractor, "MachO Segments"),
        'imports': (MachOImportExtractor, "MachO Imports"),
        'exports': (MachOExportExtractor, "MachO Exports"),
        'dylibs': (MachODylibExtractor, "MachO Dylibs"),
        'signature': (MachOSignatureExtractor, "MachO Code Signature"),
        'universal': (MachOUniversalExtractor, "MachO Universal/FAT"),
    }
    
    if extractor_name == "all":
        print(f"Testing all extractors with file: {filepath}")
        success_count = 0
        for name, (extractor_class, display_name) in extractors.items():
            if test_extractor(extractor_class, filepath, display_name):
                success_count += 1
            print("-" * 50)
        
        print(f"\n✅ {success_count}/{len(extractors)} extractors completed successfully")
        
    elif extractor_name in extractors:
        extractor_class, display_name = extractors[extractor_name]
        success = test_extractor(extractor_class, filepath, display_name)
        
        if success:
            print(f"\n✅ {display_name} testing completed successfully")
        else:
            print(f"\n❌ {display_name} testing failed")
            sys.exit(1)
    else:
        print(f"Unknown extractor: {extractor_name}")
        print("Available extractors:", ", ".join(extractors.keys()) + ", all")
        sys.exit(1)

if __name__ == "__main__":
    main()