MCPcopy Index your code
hub / github.com/LCBOWER33/StegoScan / is_elf_using_magic

Function is_elf_using_magic

StegoScan.py:827–835  ·  view source on GitHub ↗

Check if a file starts with ELF magic bytes.

(filepath)

Source from the content-addressed store, hash-verified

825
826
827def is_elf_using_magic(filepath):
828 """Check if a file starts with ELF magic bytes."""
829 try:
830 with open(filepath, "rb") as f:
831 magic = f.read(4)
832 return magic == b'\x7FELF'
833 except Exception as e:
834 prRed(f"Error reading file: {e}")
835 return False
836
837
838def check_with_file_command(filepath):

Callers 1

elf_checkFunction · 0.85

Calls 1

prRedFunction · 0.85

Tested by

no test coverage detected