Vanessa Teague

119 papers A* 5A 3B 5Journal 56Unranked 40
YearRankTypeTitle / Venue / Authors
2025 J jnl
CoRR
Michelle L. Blom, Alexander Ek, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2025 J jnl
CoRR
Michelle L. Blom, Alexander Ek, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2025 conf
E-VOTE-ID
Ben Adida, John Caron, Arash Mirzaei, Vanessa Teague
2025 J jnl
CoRR
Vanessa Teague, Arash Mirzaei
2025 J jnl
CoRR
Andrew Conway, Michelle L. Blom, Alexander Ek, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2024 J jnl
J. Cybersecur.
Harold Abelson, Ross J. Anderson, Steven M. Bellovin, Josh Benaloh, Matt Blaze, Jon Callas, Whitfield Diffie, Susan Landau, Peter G. Neumann, Ronald L. Rivest, Jeffrey I. Schiller, Bruce Schneier, Vanessa Teague, Carmela Troncoso
2024 J jnl
CoRR
Ben Adida, John Caron, Arash Mirzaei, Vanessa Teague
2024 ed.
Public Key Cryptography (1)
Qiang Tang, Vanessa Teague
2024 ed.
Public Key Cryptography (2)
Qiang Tang, Vanessa Teague
2024 ed.
Public Key Cryptography (3)
Qiang Tang, Vanessa Teague
2024 ed.
Public Key Cryptography (4)
Qiang Tang, Vanessa Teague
2024 conf
FC Workshops
Michelle L. Blom, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2024 J jnl
CoRR
Michelle L. Blom, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2024 J jnl
CoRR
Chris Culnane, Andrew Conway, Vanessa Teague, Ty Wilson-Brown
2023 A conf
AsiaCCS
Vanessa Teague
2023 conf
FC Workshops
Michelle L. Blom, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2023 J jnl
CoRR
Michelle L. Blom, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2022 conf
Financial Cryptography Workshops
Michelle L. Blom, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2022 J jnl
CoRR
Michelle L. Blom, Philip B. Stark, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2022 J jnl
CoRR
Floyd Everest, Michelle L. Blom, Philip B. Stark, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2022 conf
CyberICPS/SECPRE/SPOSE/CPS4CIP/CDT&SECOMAN/EIS/SecAssure@ESORICS
Floyd Everest, Michelle L. Blom, Philip B. Stark, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2022 J jnl
CoRR
Floyd Everest, Michelle L. Blom, Philip B. Stark, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2022 J jnl
IACR Cryptol. ePrint Arch.
Aggelos Kiayias, Vanessa Teague, Orfeas Stefanos Thyfronitis Litos
2022 J jnl
Int. J. Medical Informatics
Amy Beth Corman, Rachel Canaway, Chris Culnane, Vanessa Teague
2022 conf
E-Vote-ID
Thomas Haines, Olivier Pereira, Vanessa Teague
2021 J jnl
CoRR
Michelle L. Blom, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2021 conf
E-VOTE-ID
Michelle L. Blom, Jurlind Budurushi, Ronald L. Rivest, Philip B. Stark, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2021 J jnl
CoRR
Michelle L. Blom, Jurlind Budurushi, Ronald L. Rivest, Philip B. Stark, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2021 conf
Financial Cryptography Workshops
Michelle L. Blom, Philip B. Stark, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2021 J jnl
CoRR
Michelle L. Blom, Philip B. Stark, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2021 J jnl
CoRR
Hal Abelson, Ross J. Anderson, Steven M. Bellovin, Josh Benaloh, Matt Blaze, Jon Callas, Whitfield Diffie, Susan Landau, Peter G. Neumann, Ronald L. Rivest, Jeffrey I. Schiller, Bruce Schneier, Vanessa Teague, Carmela Troncoso
2021 J jnl
CoRR
Eleanor McMurtry, Xavier Boyen, Chris Culnane, Kristian Gjøsteen, Thomas Haines, Vanessa Teague
2021 J jnl
IEEE Secur. Priv.
Josh Benaloh, Kammi Foote, Philip B. Stark, Vanessa Teague, Dan S. Wallach
2021 conf
CRYPTO (1)
Vanessa Teague
2020 J jnl
CoRR
Zhuoqun Huang, Ronald L. Rivest, Philip B. Stark, Vanessa Teague, Damjan Vukcevic
2020 conf
PAKDD (2)
Leyla Roohi, Benjamin I. P. Rubinstein, Vanessa Teague
2020 J jnl
CoRR
Leyla Roohi, Benjamin I. P. Rubinstein, Vanessa Teague
2020 A* conf
SP
Thomas Haines, Sarah Jamie Lewis, Olivier Pereira, Vanessa Teague
2020 J jnl
CoRR
Michelle L. Blom, Andrew Conway, Peter J. Stuckey, Vanessa Teague, Damjan Vukcevic
2020 conf
WOOT @ USENIX Security Symposium
Vanessa Teague
2020 conf
ESORICS (2)
Eleanor McMurtry, Olivier Pereira, Vanessa Teague
2020 J jnl
IACR Cryptol. ePrint Arch.
Eleanor McMurtry, Olivier Pereira, Vanessa Teague
2020 J jnl
CoRR
Michelle L. Blom, Andrew Conway, Dan King, Laurent Sandrolini, Philip B. Stark, Peter J. Stuckey, Vanessa Teague
2019 conf
E-VOTE-ID
Vishal Mohanty, Chris Culnane, Philip B. Stark, Vanessa Teague
2019 J jnl
CoRR
Vishal Mohanty, Nicholas Akinyokun, Andrew Conway, Chris Culnane, Philip B. Stark, Vanessa Teague
2019 A* conf
INFOCOM
Leyla Roohi, Benjamin I. P. Rubinstein, Vanessa Teague
2019 J jnl
CoRR
Leyla Roohi, Benjamin I. P. Rubinstein, Vanessa Teague
2019 ed.
Financial Cryptography Workshops
Aviv Zohar, Ittay Eyal, Vanessa Teague, Jeremy Clark, Andrea Bracciali, Federico Pintore, Massimiliano Sala
2019 J jnl
IEEE Secur. Priv.
Chris Culnane, Aleksander Essex, Sarah Jamie Lewis, Olivier Pereira, Vanessa Teague
2019 conf
ACSW
Nicholas Akinyokun, Vanessa Teague
2019 J jnl
CoRR
Michelle L. Blom, Peter J. Stuckey, Vanessa Teague
2019 J jnl
CoRR
Chris Culnane, Benjamin I. P. Rubinstein, Vanessa Teague
2019 conf
Financial Cryptography
Kim Ramchen, Chris Culnane, Olivier Pereira, Vanessa Teague
2018 J jnl
CoRR
Chris Culnane, Benjamin I. P. Rubinstein, Vanessa Teague
2018 J jnl
IACR Cryptol. ePrint Arch.
Chris Culnane, Olivier Pereira, Kim Ramchen, Vanessa Teague
2017 J jnl
IEEE Secur. Priv.
Josh Benaloh, Peter Y. A. Ryan, Steve A. Schneider, Vanessa Teague
2017 conf
ACSW
Andrew Conway, Michelle L. Blom, Lee Naish, Vanessa Teague
2017 J jnl
CoRR
Michelle L. Blom, Peter J. Stuckey, Vanessa Teague
2017 ed.
E-VOTE-ID
Robert Krimmer, Melanie Volkamer, Jordi Barrat, Josh Benaloh, Nicole J. Goodman, Peter Y. A. Ryan, Vanessa Teague
2017 ed.
Financial Cryptography Workshops
Michael Brenner, Kurt Rohloff, Joseph Bonneau, Andrew Miller, Peter Y. A. Ryan, Vanessa Teague, Andrea Bracciali, Massimiliano Sala, Federico Pintore, Markus Jakobsson
2017 J jnl
CoRR
Chris Culnane, Benjamin I. P. Rubinstein, Vanessa Teague
2017 J jnl
CoRR
Chris Culnane, Benjamin I. P. Rubinstein, Vanessa Teague
2017 conf
TrustCom/BigDataSE/ICESS
Leyla Roohi, Vanessa Teague
2017 conf
E-VOTE-ID
Matthew Bernhard, Josh Benaloh, J. Alex Halderman, Ronald L. Rivest, Peter Y. A. Ryan, Philip B. Stark, Vanessa Teague, Poorvi L. Vora, Dan S. Wallach
2017 J jnl
CoRR
Josh Benaloh, Matthew Bernhard, J. Alex Halderman, Ronald L. Rivest, Peter Y. A. Ryan, Philip B. Stark, Vanessa Teague, Poorvi L. Vora, Dan S. Wallach
2017 B conf
ARES
Nicholas Akinyokun, Vanessa Teague
2017 conf
E-VOTE-ID
Chris Culnane, Mark Eldridge, Aleksander Essex, Vanessa Teague
2017 J jnl
CoRR
Chris Culnane, Mark Eldridge, Aleksander Essex, Vanessa Teague
2017 J jnl
CoRR
Chris Culnane, Benjamin I. P. Rubinstein, Vanessa Teague
2017 conf
HAISA
Chris Culnane, Vanessa Teague
2016 J jnl
Ann. des Télécommunications
J. Paul Gibson, Robert Krimmer, Vanessa Teague, Julia Pomares
2016 J jnl
CoRR
Andrew Conway, Michelle L. Blom, Lee Naish, Vanessa Teague
2016 J jnl
CoRR
Berj Chilingirian, Zara Perumal, Ronald L. Rivest, Grahame Bowland, Andrew Conway, Philip B. Stark, Michelle L. Blom, Chris Culnane, Vanessa Teague
2016 A conf
ECAI
Michelle L. Blom, Vanessa Teague, Peter J. Stuckey, Ron Tidhar
2016 J jnl
IACR Cryptol. ePrint Arch.
Justin Bedo, Thomas C. Conway, Kim Ramchen, Vanessa Teague
2016 conf
GameSec
Chris Culnane, Vanessa Teague
2015 J jnl
CoRR
Michelle L. Blom, Peter J. Stuckey, Vanessa Teague, Ron Tidhar
2015 J jnl
IEEE Secur. Priv.
Peter Y. A. Ryan, Steve A. Schneider, Vanessa Teague
2015 J jnl
CoRR
Josh Benaloh, Ronald L. Rivest, Peter Y. A. Ryan, Philip B. Stark, Vanessa Teague, Poorvi L. Vora
2015 conf
VoteID
Oksana Kulyk, Vanessa Teague, Melanie Volkamer
2015 conf
VoteID
J. Alex Halderman, Vanessa Teague
2015 J jnl
CoRR
J. Alex Halderman, Vanessa Teague
2015 J jnl
ACM Trans. Inf. Syst. Secur.
Chris Culnane, Peter Y. A. Ryan, Steve A. Schneider, Vanessa Teague
2014 J jnl
Formal Aspects Comput.
James Heather, Steve A. Schneider, Vanessa Teague
2014 conf
EVT/WOTE
Chris Culnane, James Heather, Rui Joaquim, Peter Y. A. Ryan, Steve A. Schneider, Vanessa Teague
2014 J jnl
J. Inf. Secur. Appl.
Steve A. Schneider, Vanessa Teague, Chris Culnane, James Heather
2014 J jnl
CoRR
Chris Culnane, Peter Y. A. Ryan, Steve A. Schneider, Vanessa Teague
2013 ed.
VoteID
James Heather, Steve A. Schneider, Vanessa Teague
2013 conf
Security Protocols Workshop
Vanessa Teague
2013 conf
Security Protocols Workshop
Josh Benaloh, Peter Y. A. Ryan, Vanessa Teague
2012 conf
Electronic Voting
Craig Burton, Chris Culnane, James Heather, Thea Peacock, Peter Y. A. Ryan, Steve A. Schneider, Sriramkrishnan Srinivasan, Vanessa Teague, Roland Wen, Zhe Xia
2012 conf
Public Key Cryptography
Udaya Parampalli, Kim Ramchen, Vanessa Teague
2012 conf
EVT/WOTE
Craig Burton, Chris Culnane, James Heather, Thea Peacock, Peter Y. A. Ryan, Steve A. Schneider, Vanessa Teague, Roland Wen, Zhe Xia, Sriramkrishnan Srinivasan
2011 ed.
EVT/WOTE
Hovav Shacham, Vanessa Teague
2011 conf
VoteID
James Heather, Morgan Llewellyn, Vanessa Teague, Roland Wen
2011 conf
VoteID
Richard Buckland, Vanessa Teague, Roland Wen
2010 A conf
ESORICS
James Heather, Peter Y. A. Ryan, Vanessa Teague
2010 conf
Security Protocols Workshop
Giampaolo Bella, Peter Y. A. Ryan, Vanessa Teague
2009 conf
EVT/WOTE
Peter Y. A. Ryan, Vanessa Teague
2009 conf
Security Protocols Workshop
Peter Y. A. Ryan, Vanessa Teague
2009 J jnl
IEEE Trans. Inf. Forensics Secur.
Josh Benaloh, Tal Moran, Lee Naish, Kim Ramchen, Vanessa Teague
2008 conf
EVT
Vanessa Teague, Kim Ramchen, Lee Naish
2007 conf
AINA Workshops (1)
Amy Beth Corman, Peter Schachte, Vanessa Teague
2007 conf
CATS
Tom Coleman, Vanessa Teague
2007 conf
ACSC
Amy Beth Corman, Peter Schachte, Vanessa Teague
2007 B conf
ICPADS
Amy Beth Corman, Peter Schachte, Vanessa Teague
2006 B conf
ARES
Amy Beth Corman, Scott Douglas, Peter Schachte, Vanessa Teague
2006 J jnl
Theor. Comput. Sci.
John C. Mitchell, Ajith Ramanathan, Andre Scedrov, Vanessa Teague
2006 J jnl
CoRR
Joseph Y. Halpern, Vanessa Teague
2005
Vanessa Teague
2004 B conf
FoSSaCS
Ajith Ramanathan, John C. Mitchell, Andre Scedrov, Vanessa Teague
2004 A* conf
STOC
Joseph Y. Halpern, Vanessa Teague
2004 conf
Financial Cryptography
Vanessa Teague
2002 conf
ISSS
John C. Mitchell, Vanessa Teague
2001 B conf
MFPS
John C. Mitchell, Ajith Ramanathan, Andre Scedrov, Vanessa Teague
2001 J jnl
IACR Cryptol. ePrint Arch.
Moni Naor, Vanessa Teague
2001 A* conf
STOC
Moni Naor, Vanessa Teague
2001 J jnl
Graphs Comb.
Noga Alon, Vanessa Teague, Nicholas C. Wormald
2001 A* conf
LICS
John C. Mitchell, Ajith Ramanathan, Andre Scedrov, Vanessa Teague
tests/integration/test_base_extractor.py
← Index tests/integration/test_base_extractor.py python
"""
Integration tests for the base Extractor class.
"""
import pytest
import hashlib
import math
from unittest.mock import Mock, patch, MagicMock
from collections import Counter

pytestmark = [pytest.mark.integration]


class TestExtractorStaticMethods:
    """Tests for static methods in Extractor class."""

    def test_process_binary_string_printable(self):
        """Test processing a printable binary string."""
        from redb.extractors.extractor import Extractor

        # Test with printable ASCII characters
        input_bytes = b"Hello World\x00\x00\x00"
        result = Extractor.process_binary_string(input_bytes)
        assert result == "Hello World"

    def test_process_binary_string_non_printable(self):
        """Test processing a string with non-printable characters."""
        from redb.extractors.extractor import Extractor

        # Test with non-printable characters
        input_bytes = b"\x01\x02Hello\x00"
        result = Extractor.process_binary_string(input_bytes)
        assert "\\x01" in result
        assert "\\x02" in result
        assert "Hello" in result

    def test_process_binary_string_empty(self):
        """Test processing an empty binary string."""
        from redb.extractors.extractor import Extractor

        input_bytes = b"\x00\x00\x00"
        result = Extractor.process_binary_string(input_bytes)
        assert result == ""

    def test_process_binary_string_all_printable(self):
        """Test processing a fully printable string."""
        from redb.extractors.extractor import Extractor

        input_bytes = b"TestString123"
        result = Extractor.process_binary_string(input_bytes)
        assert result == "TestString123"

    def test_remove_non_utf8_valid(self):
        """Test removing non-UTF8 characters from valid UTF8 string."""
        from redb.extractors.extractor import Extractor

        input_bytes = b"Hello World"
        result = Extractor.remove_non_utf8(input_bytes)
        assert result == b"Hello World"

    def test_remove_non_utf8_with_invalid(self):
        """Test removing non-UTF8 characters from mixed string."""
        from redb.extractors.extractor import Extractor

        # Mix of valid UTF8 and invalid bytes
        input_bytes = b"Hello\xff\xfeWorld"
        result = Extractor.remove_non_utf8(input_bytes)
        # Should remove the invalid bytes
        assert b"\xff" not in result
        assert b"\xfe" not in result
        assert b"Hello" in result
        assert b"World" in result

    def test_remove_non_utf8_empty(self):
        """Test removing non-UTF8 from empty string."""
        from redb.extractors.extractor import Extractor

        result = Extractor.remove_non_utf8(b"")
        assert result == b""


class TestExtractorEntropyCalculation:
    """Tests for entropy calculation in Extractor class."""

    def test_calculate_entropy_empty_data(self, elf_binary_path, mock_logger):
        """Test entropy calculation with empty data."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            result = extractor.calculate_entropy(b"")
            assert result == 0.0

    def test_calculate_entropy_uniform_data(self, elf_binary_path, mock_logger):
        """Test entropy calculation with uniform (low entropy) data."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            # All same bytes = 0 entropy
            uniform_data = b"\x00" * 256
            result = extractor.calculate_entropy(uniform_data)
            assert result == 0.0

    def test_calculate_entropy_random_data(self, elf_binary_path, mock_logger, high_entropy_data):
        """Test entropy calculation with random (high entropy) data."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            result = extractor.calculate_entropy(high_entropy_data)
            # Random data should have entropy close to 8 (max for bytes)
            assert result > 7.0

    def test_calculate_entropy_binary_data(self, elf_binary_path, mock_logger):
        """Test entropy calculation with binary data."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            # Two equally distributed values = 1 bit entropy
            binary_data = b"\x00\x01" * 128
            result = extractor.calculate_entropy(binary_data)
            assert abs(result - 1.0) < 0.01

    def test_calculate_entropy_string_data(self, elf_binary_path, mock_logger):
        """Test entropy calculation with string data."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            # String with two equally distributed characters
            string_data = "ab" * 100
            result = extractor.calculate_entropy(string_data)
            assert abs(result - 1.0) < 0.01


class TestExtractorInitialization:
    """Tests for Extractor initialization."""

    def test_extractor_hashes_computed_on_init(self, elf_binary_path, mock_logger, known_hashes):
        """Test that hashes are computed during initialization."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)

            assert extractor.md5 == known_hashes['md5']
            assert extractor.sha1 == known_hashes['sha1']
            assert extractor.sha256 == known_hashes['sha256']

    def test_extractor_hash_dataclass_created(self, elf_binary_path, mock_logger, known_hashes):
        """Test that Hash dataclass is created during initialization."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)

            assert extractor.hash.md5 == known_hashes['md5']
            assert extractor.hash.sha1 == known_hashes['sha1']
            assert extractor.hash.sha256 == known_hashes['sha256']

    def test_extractor_binary_cached_property(self, elf_binary_path, mock_logger, elf_binary_content):
        """Test that binary content is loaded as cached property."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)

            # Access binary property
            binary = extractor.binary
            assert binary == elf_binary_content

            # Second access should return cached value (same id)
            assert extractor.binary is binary

    def test_extractor_with_exporters(self, elf_binary_path, mock_logger, mock_print_exporter):
        """Test extractor initialization with exporters."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                exporters=[mock_print_exporter]
            )

            assert len(extractor.exporters) == 1
            assert extractor.exporters[0] is mock_print_exporter

    def test_extractor_with_index_prefix(self, elf_binary_path, mock_logger):
        """Test extractor initialization with custom index prefix."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                index_prefix="custom_prefix"
            )

            assert "custom_prefix" in extractor.elastic_index

    def test_extractor_known_benign_flag(self, elf_binary_path, mock_logger):
        """Test extractor with known_benign flag."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                known_benign=True
            )

            assert extractor.known_benign is True
            assert extractor.known_malicious is False

    def test_extractor_known_malicious_flag(self, elf_binary_path, mock_logger):
        """Test extractor with known_malicious flag."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                known_malicious=True
            )

            assert extractor.known_benign is False
            assert extractor.known_malicious is True


class TestExtractorExportData:
    """Tests for export_data method."""

    def test_export_data_with_print_exporter(self, elf_binary_path, mock_logger, mock_print_exporter, capsys):
        """Test export_data with PrintExporter."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                exporters=[mock_print_exporter]
            )

            result = extractor.export_data()
            # Should succeed with PrintExporter
            assert result is True

    def test_export_data_no_exporters(self, elf_binary_path, mock_logger):
        """Test export_data with no exporters configured."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                exporters=[]
            )

            result = extractor.export_data()
            # Should succeed with no exporters (nothing to export)
            assert result is True


class TestExtractorEdgeCases:
    """Tests for edge cases in Extractor class."""

    def test_extractor_with_nonexistent_file(self, mock_logger):
        """Test extractor with non-existent file."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            with pytest.raises(FileNotFoundError):
                BasicPropertiesExtractor("/nonexistent/file.bin", mock_logger)

    def test_entropy_none_data(self, elf_binary_path, mock_logger):
        """Test entropy calculation with None returns 0."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            result = extractor.calculate_entropy(None)
            assert result == 0.0

    def test_process_binary_string_high_bytes(self):
        """Test processing binary string with high byte values."""
        from redb.extractors.extractor import Extractor

        # Characters above 126 are non-printable
        input_bytes = b"\x7f\x80\x81\xff"
        result = Extractor.process_binary_string(input_bytes)
        assert "\\x7f" in result
        assert "\\x80" in result
        assert "\\xff" in result