{"id":28160132,"url":"https://github.com/daymade/file_analyzer","last_synced_at":"2025-05-15T10:14:14.259Z","repository":{"id":287547631,"uuid":"965079831","full_name":"daymade/file_analyzer","owner":"daymade","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-12T11:22:22.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T12:36:03.739Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daymade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-12T11:15:13.000Z","updated_at":"2025-04-12T11:22:25.000Z","dependencies_parsed_at":"2025-04-12T12:47:59.368Z","dependency_job_id":null,"html_url":"https://github.com/daymade/file_analyzer","commit_stats":null,"previous_names":["daymade/file_analyzer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daymade%2Ffile_analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daymade%2Ffile_analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daymade%2Ffile_analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daymade%2Ffile_analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daymade","download_url":"https://codeload.github.com/daymade/file_analyzer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319660,"owners_count":22051076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-15T10:12:53.452Z","updated_at":"2025-05-15T10:14:14.247Z","avatar_url":"https://github.com/daymade.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Analyzer Tool\n\nA command-line tool to analyze file contents, useful for investigating potentially corrupted or unknown file formats.\n\n## Features\n\n*   **Hex Viewer:** Displays hexadecimal dumps of the file's header, middle, and footer.\n*   **Text Extractor:** Attempts to extract readable text fragments using various common encodings (UTF-8, GB18030, GBK, Big5, Shift_JIS).\n*   **Entropy Calculation:** Calculates Shannon entropy, which can indicate compression or encryption.\n*   **BitLocker Check:** Looks for common BitLocker signatures and checks for high entropy.\n*   **General Analysis:** Combines text extraction, BitLocker check, and entropy analysis.\n\n## Usage\n\n```bash\npython file_analyzer.py \u003ccommand\u003e \u003cpath\u003e [path...] [options]\n```\n\n### Arguments\n\n*   `\u003cpath\u003e [path...]`: One or more paths to files or directories to analyze.\n\n### Commands\n\n*   `analyze \u003cpath\u003e [path...] [options]`:\n    Performs general analysis (entropy, text fragments, BitLocker check).\n    *   `--encodings \u003cenc1\u003e \u003cenc2\u003e ...`: Specify encodings to try (default: utf-8 gb18030 gbk big5).\n    *   `--min-len \u003clength\u003e`: Minimum length for text fragments (default: 4).\n    *   `--limit \u003cnumber\u003e`: Max fragments to show per encoding (default: 5).\n    *   `--recursive`: Recursively search directories for files to analyze.\n\n*   `hexview \u003cpath\u003e [path...] [options]`:\n    Displays hexadecimal view.\n    *   `--bytes \u003cnum\u003e`: Bytes to show from header/middle/footer (default: 256).\n    *   `--line-bytes \u003cnum\u003e`: Bytes per line in hex view (default: 16).\n    *   `--recursive`: Recursively search directories for files to view.\n\n*   `extract-text \u003cpath\u003e [path...] [options]`:\n    Extracts potential text fragments.\n    *   `--encodings \u003cenc1\u003e \u003cenc2\u003e ...`: Specify encodings (default: utf-8 gb18030 gbk big5 shift_jis).\n    *   `--min-len \u003clength\u003e`: Minimum length for fragments (default: 4).\n    *   `--limit \u003cnumber\u003e`: Max fragments to show per encoding (default: 20).\n    *   `--recursive`: Recursively search directories for files to extract text from.\n\n*   `check-bitlocker \u003cpath\u003e [path...] [options]`:\n    Checks for BitLocker signatures and high entropy.\n    *   `--recursive`: Recursively search directories for files to check.\n\n### Examples\n\n```bash\n# Perform general analysis on a single file\npython file_analyzer.py analyze recovered_file.dat\n\n# Analyze all files directly inside the 'data' directory\npython file_analyzer.py analyze data/\n\n# Recursively analyze all files within the 'project_files' directory\npython file_analyzer.py analyze project_files/ --recursive\n\n# Analyze specific files\npython file_analyzer.py analyze file1.bin file2.tmp ../other_dir/file3.dat\n\n# View hex data of specific files\npython file_analyzer.py hexview image.jpg doc.unknown\n\n# Extract text using only GBK and GB18030 from all files in current dir\npython file_analyzer.py extract-text . --encodings gbk gb18030\n\n# Recursively check for BitLocker signatures in a directory\npython file_analyzer.py check-bitlocker /mnt/partition --recursive\n\n## Requirements\n\n*   Python 3.x\n*   No external libraries required by default.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaymade%2Ffile_analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaymade%2Ffile_analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaymade%2Ffile_analyzer/lists"}