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

Function check_with_file_command

StegoScan.py:838–845  ·  view source on GitHub ↗

Check the file type using the 'file' command (Linux/Mac only).

(filepath)

Source from the content-addressed store, hash-verified

836
837
838def check_with_file_command(filepath):
839 """Check the file type using the 'file' command (Linux/Mac only)."""
840 try:
841 result = subprocess.run(["file", "-b", filepath], capture_output=True, text=True)
842 return "ELF" in result.stdout
843 except Exception as e:
844 prRed(f"Error running file command: {e}")
845 return False
846
847
848def calculate_entropy(filepath):

Callers 1

elf_checkFunction · 0.85

Calls 1

prRedFunction · 0.85

Tested by

no test coverage detected