Check the file type using the 'file' command (Linux/Mac only).
(filepath)
| 836 | |
| 837 | |
| 838 | def 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 | |
| 848 | def calculate_entropy(filepath): |