{"id":18699437,"url":"https://github.com/dyng/hexfilter","last_synced_at":"2025-08-27T17:05:21.943Z","repository":{"id":146255928,"uuid":"14103292","full_name":"dyng/hexfilter","owner":"dyng","description":"Read/Write non-printable characters in a printable way.","archived":false,"fork":false,"pushed_at":"2013-11-18T12:06:54.000Z","size":116,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T08:17:52.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/dyng.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}},"created_at":"2013-11-04T07:21:31.000Z","updated_at":"2022-02-02T08:19:24.000Z","dependencies_parsed_at":"2023-03-23T21:24:18.055Z","dependency_job_id":null,"html_url":"https://github.com/dyng/hexfilter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyng%2Fhexfilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyng%2Fhexfilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyng%2Fhexfilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyng%2Fhexfilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyng","download_url":"https://codeload.github.com/dyng/hexfilter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537192,"owners_count":21120711,"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":"2024-11-07T11:33:09.974Z","updated_at":"2025-04-12T08:17:57.366Z","avatar_url":"https://github.com/dyng.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hexfilter\n\nRead/Write non-printable characters in a printable way.\n\n## Synopsis\n\n    hexfilter COMMAND [ARG]...\n\n`hexfilter` was originally developed for cracking. It's not rare when you need to input raw hex values in cracking something, usually it is done by `echo` or `printf`. Use `echo` or `printf` to generate the hex string and redirect it to a temp file, then `cat` the file as stdin. However, this way does not work if you need to input interactively. Yes, `hexfilter` is exactly for this.\n\n`hexfilter` takes over subcommand's *stdin*, *stdout* and *stderr*, parses non-printal characters in *stdout*/*stderr* to '\\xXX' format and prints it to terminal. Also it accepts the same '\\xXX' format for inputing hex characters, converts and passes it to subcommand.\n\n## Compile\n\n`hexfilter` depends on C POSIX library only as you can compile it on UNIX-like system by\n\n    gcc -o hexfilter hexfilter.c\n\nOr if you prefer `clang`, nothing will change\n\n    clang -o hexfilter hexfilter.c\n\nIf a Makefile turns out to be necessary, I'll write it, but now I want to keep everything in a simplest way.\n\n## Example\n\n#### Read\n\n    $ echo -ne 'ab\\xff\\xfe\\n' \u003e/tmp/input\n    $ cat /tmp/input\n    ab??                      # can't properly print '\\xff' and '\\xfe'\n    $ ./hexfilter cat /tmp/input\n    ab\\xff\\xfe                # binary byte '0xff' and '\\xfe' are printed as human-readable strings\n\n#### Write\n\n    $ ./hexfilter tee /tmp/output \u003e/dev/null\n    ab\\xff\\xfe                # input hexadecimal value as plain string '\\xff' and '\\xfe'\n    ^C\n    $ hexdump /tmp/output\n    0000000 61 62 ff fe 0a    # actually in file are exactly those hex characters\n    0000005\n\n## TODO\n\n1. End stdin when `CTRL-D` is pressed. (The conventional way to end input but not supported yet)\n2. Handle redirection and pipe for subcommand.\n\n## Contribute\n\nI think it is an useful tool but I don't have much time to improve it. **Your contribution is really welcome!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyng%2Fhexfilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyng%2Fhexfilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyng%2Fhexfilter/lists"}