EntropyAnalysis (version 1.0.0)
index
entropyanalysis.py

This package analyzes file entropy (shannon entropy) for forensic or
malware analysis

 
Classes
       
builtins.object
EntropyAnalysis

 
class EntropyAnalysis(builtins.object)
    This class implements an entropy analysis.
 
  Methods defined here:
__init__(self)
Initialize self.  See help(type(self)) for accurate signature.
add_character(self, new_character: int, old_character: int) -> float
This method adds change the current entropy by
removing a character and adding a new character.
get_entropy(self, data: Iterable[collections.abc.Hashable]) -> float
This method returns the shannon entropy for bytes.
 
Greater entropy = more randomness
Max entropy: 8
Min entropy: 0

Static methods defined here:
calcul_entropy(frequency: int, data_length: int) -> float
This method returns the shannon entropy from a frequence and a length.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
charts_chunks_file_entropy(file: _io._IOBase, chunk_size: int = 2048, part_size: int = None, all_characters: bool = False, sections: List[EntropyAnalysis.Section] = []) -> None
This function spwans a charts of chunks shannon entropy.
get_chunks_file_entropy(file: _io._IOBase, chunk_size: int = 2048) -> Iterable[float]
This function yields all chunks shannon entropy
for the file.
get_full_file_entropy(file: _io._IOBase) -> float
This function reads all data in file and
returns the shannon entropy.
get_parts_chunks_file_entropy(file: _io._IOBase, chunk_size: int = 2048, part_size: int = 100) -> Iterable[float]
The function yields all the shannon entropy scores
of the parts of each chunk for the file.
print_chunks_file_entropy(file: _io._IOBase, chunk_size: int = 2048, colors: bool = True) -> None
This function prints chunks shannon entropy in console.
print_parts_chunks_file_entropy(file: _io._IOBase, chunk_size: int = 2048, part_size: int = 100, colors: bool = True) -> None
This function prints all the shannon entropy scores
of the parts of each chunk in console.

 
Data
        __all__ = ['get_full_file_entropy', 'get_chunks_file_entropy', 'get_parts_chunks_file_entropy', 'print_chunks_file_entropy', 'charts_chunks_file_entropy', 'print_parts_chunks_file_entropy', 'EntropyAnalysis']
__author_email__ = 'mauricelambert434@gmail.com'
__copyright__ = '\nEntropyAnalysis Copyright (C) 2023, 2024 Maur...ome to redistribute it\nunder certain conditions.\n'
__description__ = '\nThis package analyzes file entropy (shannon entropy) for forensic or\nmalware analysis\n'
__license__ = 'GPL-3.0 License'
__maintainer__ = 'Maurice Lambert'
__maintainer_email__ = 'mauricelambert434@gmail.com'
__url__ = 'https://github.com/mauricelambert/EntropyAnalysis'

 
Author
        Maurice Lambert