{"id":16688166,"url":"https://github.com/jstrait/fileinspector","last_synced_at":"2025-08-24T12:34:48.976Z","repository":{"id":475094,"uuid":"100313","full_name":"jstrait/fileinspector","owner":"jstrait","description":"Utility to view contents of a file in different formats side-by-side","archived":false,"fork":false,"pushed_at":"2009-07-19T02:54:22.000Z","size":84,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-13T17:51:41.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/jstrait.png","metadata":{"files":{"readme":"README.markdown","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}},"created_at":"2009-01-03T17:53:43.000Z","updated_at":"2020-02-12T23:19:57.000Z","dependencies_parsed_at":"2022-07-07T16:30:34.076Z","dependency_job_id":null,"html_url":"https://github.com/jstrait/fileinspector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jstrait/fileinspector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrait%2Ffileinspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrait%2Ffileinspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrait%2Ffileinspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrait%2Ffileinspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jstrait","download_url":"https://codeload.github.com/jstrait/fileinspector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrait%2Ffileinspector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271863764,"owners_count":24835852,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-10-12T15:27:06.524Z","updated_at":"2025-08-24T12:34:48.955Z","avatar_url":"https://github.com/jstrait.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What Is It?\r\n\r\nFileInspector is a hex viewer with support for additional data formats. In particular, it allows you to view numeric data in varying byte length and endianness. Different formats can be viewed side-by-side. One use is to help reverse-engineer file formats that contain multiple data types. It was originally written to help reverse engineer the *.HUB file format used by the Hammerhead drum machine (see [Clawhammer](http://github.com/jstrait/clawhammer/tree/master)), and then cleaned up for general use.\r\n\r\n\r\n## How to Install\r\n\r\nTwo files are required for FileInspector:\r\n\r\n* FileInspector.rb - Contains the FileInspector class, which implements the core functionality.\r\n* fin.rb - A wrapper for FileInspector.rb which allows it to be used from the command line.\r\n\r\n\r\n## Usage\r\n\r\n    ruby fin.rb [-bytes start:end] filename formats\r\n\r\nExample:\r\n\r\n    ruby fin.rb example.txt abhsf\r\n\r\nThis will produce the following output:\r\n\r\n                a          b    h        s                        f\r\n    ===============================================================\r\n     0:         T   00101010   45    26708     1.84924498566139e+31\r\n     1:         h   00010110   86                                  \r\n     2:         i   10010110   96    29545                         \r\n     3:         s   11001110   37                                  \r\n     4:   [SPACE]   00000100   02    26912     2.06176835630374e-19\r\n     5:         i   10010110   96                                  \r\n     6:         s   11001110   37     8307                         \r\n     7:   [SPACE]   00000100   02                                  \r\n     8:         a   10000110   16     8289     7.20534192010734e+22\r\n     9:   [SPACE]   00000100   02                                  \r\n    10:         t   00101110   47    25972                         \r\n    11:         e   10100110   56                                  \r\n    12:         s   11001110   37    29811     5.37580603001101e-31\r\n    13:         t   00101110   47                                  \r\n    14:         .   01110100   e2     3374                         \r\n    15:      [CR]   10110000   d0                                  \r\n    16:      [LF]   01010000   a0    21514     1.81692580458497e+31\r\n    17:         T   00101010   45                                  \r\n    18:         e   10100110   56    29541                         \r\n    19:         s   11001110   37                                  \r\n    20:         t   00101110   47    26996     1.12586848973162e+24\r\n    21:         i   10010110   96                                  \r\n    22:         n   01110110   e6    26478                         \r\n    23:         g   11100110   76                                  \r\n    24:   [SPACE]   00000100   02    12576     4.14885334976134e-08\r\n    25:         1   10001100   13                                  \r\n    26:         2   01001100   23    13106                         \r\n    27:         3   11001100   33                                  \r\n    28:         .   01110100   e2     3374                       ..\r\n    29:      [CR]   10110000   d0                                  \r\n    30:      [LF]   01010000   a0       ..        \r\n\r\n\r\n## Parameters\r\n\r\n### Bytes (Optional)\r\n\r\nAllows displaying only the part of the file between the start byte and end byte. If left out, the contents of the entire file will be displayed. Starting and ending byte indexes are zero-indexed.\r\n\r\n**Examples:**\r\n\r\n_Display first 10 bytes of the file:_\r\n    ruby fin.rb -bytes 0:9 example.txt abhs\r\n_Same as above:_  \r\n    ruby fin.rb -bytes :9 example.txt abhs\r\n_Display from 11th byte to end of file_\r\n    ruby fin.rb -bytes 10: example.txt abhs\r\n_Display from 11th byte to 21st byte_\r\n    ruby fin.rb -bytes 10:20\r\n\r\n### File\r\n\r\nThe name of the file to inspect.\r\n\r\n### Formats\r\n\r\nThe data formats to display are specified using the same formats accepted by Ruby's [Array.pack](http://www.ruby-doc.org/core/classes/Array.html#M002222) and [String.unpack](http://www.ruby-doc.org/core/classes/String.html#M000760) methods. Certain format directives are not valid, because they don't make sense in the context of FileInspector.\r\n\r\n\u003cpre\u003eSupported: a, B, b, C, c, D, d, E, e, F, f, G, g, H, h, I, i, L, l, N, n, Q, q, S, S, V, v\r\nUnsupported: @, A, M, m, P, p, U, u, w, X, x, Z\u003c/pre\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstrait%2Ffileinspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjstrait%2Ffileinspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstrait%2Ffileinspector/lists"}