{"id":19796506,"url":"https://github.com/frohoff/ciphr","last_synced_at":"2025-07-11T21:34:58.400Z","repository":{"id":62555666,"uuid":"13084317","full_name":"frohoff/ciphr","owner":"frohoff","description":"CLI crypto swiss-army knife for performing and composing encoding, decoding, encryption, decryption, hashing, and other various cryptographic operations on streams of data from the command line; mostly intended for ad hoc, infosec-related uses.","archived":false,"fork":false,"pushed_at":"2018-08-04T01:36:17.000Z","size":115,"stargazers_count":116,"open_issues_count":5,"forks_count":28,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-10T02:54:21.888Z","etag":null,"topics":["cli","command-line","crypto","cryptography","decoding","decryption","encoding","encryption","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frohoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-25T04:42:53.000Z","updated_at":"2025-03-01T10:50:39.000Z","dependencies_parsed_at":"2022-11-03T05:31:07.802Z","dependency_job_id":null,"html_url":"https://github.com/frohoff/ciphr","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/frohoff/ciphr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frohoff%2Fciphr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frohoff%2Fciphr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frohoff%2Fciphr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frohoff%2Fciphr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frohoff","download_url":"https://codeload.github.com/frohoff/ciphr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frohoff%2Fciphr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264903155,"owners_count":23681127,"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":["cli","command-line","crypto","cryptography","decoding","decryption","encoding","encryption","ruby"],"created_at":"2024-11-12T07:19:52.781Z","updated_at":"2025-07-11T21:34:58.120Z","avatar_url":"https://github.com/frohoff.png","language":"Ruby","readme":"# Ciphr\n\nCiphr is a CLI tool for performing and composing encoding, decoding, encryption,\ndecryption, hashing, and other various operations on streams of data. It takes\nprovided data, file data, or data from stdin, and executes a pipeline of \nfunctions on the data stream, writing the resulting data to stdout. It was \ndesigned primarily for use in the information security domain, mostly for quick\nor casual data manipulation for forensics, penetration testing, or \ncapture-the-flag events; it likely could have other unforseen uses, but should \nbe presumed to be an experimental toy as no effort was made to make included \ncryptographic functions robust against attacks (timing attacks, etc), and it is \nrecommended not to use any included functions in any on-line security \nmechanisms.\n\n## Examples\n\n```console\n$ ciphr '\"abc\"'\nabc\n$ ciphr '\"abc\"' hex\n616263\n$ ciphr '\"abc\"' hex ~hex\nabc\n$ ciphr '\"616263\"' ~hex\nabc\n$ ciphr 0x616263\nabc\n$ ciphr 0x616263 hex\n616263\n$ ciphr 0b10101010 bin\n10101010\n$ ciphr 0b10101010 hex\naa\n$ ciphr 255 hex\nff\n$ ciphr 65\nA\n$ ciphr '\"\"' md5 hex\nd41d8cd98f00b204e9800998ecf8427e\n$ echo -n \"\" | ciphr md5 hex\nd41d8cd98f00b204e9800998ecf8427e\n$ ciphr '\"abc\"' sha1 hex\na9993e364706816aba3e25717850c26c9cd0d89d\n$ echo -n \"abc\" | ciphr sha1 | xxd -ps\na9993e364706816aba3e25717850c26c9cd0d89d\n$ echo -n \"abc\" | ciphr 'xor[\"abc\"] hex'\n000000\n$ echo -n \"abc\" | ciphr xor[0x01] hex\n606362\n$ echo -n \"abc\" | ciphr xor[0x01]\n`cb\n$ echo -n \"abc\" | ciphr xor[0x020304]\ncag\n$ echo -n \"abc\" | ciphr 'aes128cbc[\"super secret key\"] hex'\n1e98110410ea0aa59a31ddc462d720d07e1e01268e405ee9fba29b3f91752e0c\n$ echo -n \"abc\" | ciphr 'aes128cbc[\"super secret key\"] hex ~hex ~aes128cbc[\"super secret key\"]'\nabc\n$ ciphr @/etc/hosts\n127.0.0.1       localhost\n$ ciphr @/etc/hosts md5 hex\n8f4491642052129e98cc211b4f32d9c5\n$ ciphr @/etc/hosts xor[0x01]\n036/1/1/mnb`minru\n$ ciphr @/etc/hosts aes-128-cbc[@/etc/hosts] hex\n3033c8627781ae2152d0b25f1acd3397161d5e8462164716539502ad908163e13eec1a73ee03ba89a877ac49fd04d7a3\n$ ciphr @/etc/hosts aes-128-cbc[@/etc/hosts] ~aes-128-cbc[@/etc/hosts]\n127.0.0.1       localhost\n$ ciphr @/etc/hosts aes-128-cbc[0xdeadbeefdeadbeefdeadbeefdeadbeef] hex\n92638d3f10a303938b48bd4a108744ed4216c99b005ddc19cce752af53ef089be1e43a446fda55c4e76036f31612459f\n$ ciphr @/etc/hosts aes-128-cbc[0xdeadbeefdeadbeefdeadbeefdeadbeef] ~aes-128-cbc[0xdeadbeefdeadbeefdeadbeefdeadbeef]\n127.0.0.1       localhost\n```\n\n## Installation\n\n#### Rubygems\n\n```shell\n$ gem install ciphr\nFetching: ciphr-0.0.1.gem (100%)\nSuccessfully installed ciphr-0.0.1\nParsing documentation for ciphr-0.0.1\nInstalling ri documentation for ciphr-0.0.1\nDone installing documentation for ciphr after 2 seconds\n1 gem installed\n```\n\n#### Source\n\nRequires bundler to be installed (`gem install bundler`)\n\n```shell\ngit clone https://github.com/frohoff/ciphr.git\ncd ciphr\nbundle install\nbundle exec rake install\n```\n\n## Usage\n\n```shell\n$ ciphr -v -h\nUsage: ciphr [options] [spec]\n    -h, --help\n    -v, --verbose\n    -n, --no-newline\n    -N, --newline\n    -x, --xargs-mode\n    -0, --null\nAvailable Functions: aliases ([args])\n  md4 (input)\n  md5 (input)\n  sha (input)\n  sha1 (input)\n  sha224 (input)\n  sha256 (input)\n  sha384 (input)\n  sha512 (input)\n  hmac-md4, hmacmd4 (input, key)\n  hmac-md5, hmacmd5 (input, key)\n  hmac-sha, hmacsha (input, key)\n  hmac-sha1, hmacsha1 (input, key)\n  hmac-sha224, hmacsha224 (input, key)\n  hmac-sha256, hmacsha256 (input, key)\n  hmac-sha384, hmacsha384 (input, key)\n  hmac-sha512, hmacsha512 (input, key)\n  aes-128-cbc, aes128cbc (input, key)\n  aes-128-cbc-hmac-sha1, aes128cbchmacsha1 (input, key)\n  aes-128-cbc-hmac-sha256, aes128cbchmacsha256 (input, key)\n  aes-128-cfb, aes128cfb (input, key)\n  aes-128-cfb1, aes128cfb1 (input, key)\n  aes-128-cfb8, aes128cfb8 (input, key)\n  aes-128-ctr, aes128ctr (input, key)\n  aes-128-ecb, aes128ecb (input, key)\n  aes-128-ofb, aes128ofb (input, key)\n  aes-128-xts, aes128xts (input, key)\n  aes-192-cbc, aes192cbc (input, key)\n  aes-192-cfb, aes192cfb (input, key)\n  aes-192-cfb1, aes192cfb1 (input, key)\n  aes-192-cfb8, aes192cfb8 (input, key)\n  aes-192-ctr, aes192ctr (input, key)\n  aes-192-ecb, aes192ecb (input, key)\n  aes-192-ofb, aes192ofb (input, key)\n  aes-256-cbc, aes256cbc (input, key)\n  aes-256-cbc-hmac-sha1, aes256cbchmacsha1 (input, key)\n  aes-256-cbc-hmac-sha256, aes256cbchmacsha256 (input, key)\n  aes-256-cfb, aes256cfb (input, key)\n  aes-256-cfb1, aes256cfb1 (input, key)\n  aes-256-cfb8, aes256cfb8 (input, key)\n  aes-256-ctr, aes256ctr (input, key)\n  aes-256-ecb, aes256ecb (input, key)\n  aes-256-ofb, aes256ofb (input, key)\n  aes-256-xts, aes256xts (input, key)\n  aes128 (input, key)\n  aes192 (input, key)\n  aes256 (input, key)\n  bf (input, key)\n  bf-cbc, bfcbc (input, key)\n  bf-cfb, bfcfb (input, key)\n  bf-ecb, bfecb (input, key)\n  bf-ofb, bfofb (input, key)\n  camellia-128-cbc, camellia128cbc (input, key)\n  camellia-128-cfb, camellia128cfb (input, key)\n  camellia-128-cfb1, camellia128cfb1 (input, key)\n  camellia-128-cfb8, camellia128cfb8 (input, key)\n  camellia-128-ecb, camellia128ecb (input, key)\n  camellia-128-ofb, camellia128ofb (input, key)\n  camellia-192-cbc, camellia192cbc (input, key)\n  camellia-192-cfb, camellia192cfb (input, key)\n  camellia-192-cfb1, camellia192cfb1 (input, key)\n  camellia-192-cfb8, camellia192cfb8 (input, key)\n  camellia-192-ecb, camellia192ecb (input, key)\n  camellia-192-ofb, camellia192ofb (input, key)\n  camellia-256-cbc, camellia256cbc (input, key)\n  camellia-256-cfb, camellia256cfb (input, key)\n  camellia-256-cfb1, camellia256cfb1 (input, key)\n  camellia-256-cfb8, camellia256cfb8 (input, key)\n  camellia-256-ecb, camellia256ecb (input, key)\n  camellia-256-ofb, camellia256ofb (input, key)\n  camellia128 (input, key)\n  camellia192 (input, key)\n  camellia256 (input, key)\n  cast (input, key)\n  cast-cbc, castcbc (input, key)\n  cast5-cbc, cast5cbc (input, key)\n  cast5-cfb, cast5cfb (input, key)\n  cast5-ecb, cast5ecb (input, key)\n  cast5-ofb, cast5ofb (input, key)\n  des (input, key)\n  des-cbc, descbc (input, key)\n  des-cfb, descfb (input, key)\n  des-cfb1, descfb1 (input, key)\n  des-cfb8, descfb8 (input, key)\n  des-ecb, desecb (input, key)\n  des-ede, desede (input, key)\n  des-ede-cbc, desedecbc (input, key)\n  des-ede-cfb, desedecfb (input, key)\n  des-ede-ofb, desedeofb (input, key)\n  des-ede3, desede3 (input, key)\n  des-ede3-cbc, desede3cbc (input, key)\n  des-ede3-cfb, desede3cfb (input, key)\n  des-ede3-cfb1, desede3cfb1 (input, key)\n  des-ede3-cfb8, desede3cfb8 (input, key)\n  des-ede3-ofb, desede3ofb (input, key)\n  des-ofb, desofb (input, key)\n  des3 (input, key)\n  desx (input, key)\n  desx-cbc, desxcbc (input, key)\n  rc2 (input, key)\n  rc2-40-cbc, rc240cbc (input, key)\n  rc2-64-cbc, rc264cbc (input, key)\n  rc2-cbc, rc2cbc (input, key)\n  rc2-cfb, rc2cfb (input, key)\n  rc2-ecb, rc2ecb (input, key)\n  rc2-ofb, rc2ofb (input, key)\n  rc4 (input, key)\n  rc4-40, rc440 (input, key)\n  rc4-hmac-md5, rc4hmacmd5 (input, key)\n  seed (input, key)\n  seed-cbc, seedcbc (input, key)\n  seed-cfb, seedcfb (input, key)\n  seed-ecb, seedecb (input, key)\n  seed-ofb, seedofb (input, key)\n  aes-128-ccm, aes128ccm (input, key)\n  aes-128-gcm, aes128gcm (input, key)\n  aes-192-ccm, aes192ccm (input, key)\n  aes-192-gcm, aes192gcm (input, key)\n  aes-256-ccm, aes256ccm (input, key)\n  aes-256-gcm, aes256gcm (input, key)\n  blowfish (input, key)\n  id-aes128-ccm, idaes128ccm (input, key)\n  id-aes128-gcm, idaes128gcm (input, key)\n  id-aes128-wrap, idaes128wrap (input, key)\n  id-aes192-ccm, idaes192ccm (input, key)\n  id-aes192-gcm, idaes192gcm (input, key)\n  id-aes192-wrap, idaes192wrap (input, key)\n  id-aes256-ccm, idaes256ccm (input, key)\n  id-aes256-gcm, idaes256gcm (input, key)\n  id-aes256-wrap, idaes256wrap (input, key)\n  id-smime-alg-cms3deswrap, idsmimealgcms3deswrap (input, key)\n  b2, base2, bin, binary (input)\n  b8, base8, oct, octal (input)\n  b16, base16, hex, hexidecimal (input)\n  b32, base32, b32-std, base32-std (input)\n  b64, base64, b64-psq, b64-std, base64-psq, base64-std (input)\n  b64-ps, b64-utf7, base64-ps, base64-utf7 (input)\n  b64-ph, b64-file, base64-ph, base64-file (input)\n  b64-hu, b64-url, base64-hu, base64-url (input)\n  b64-duh, b64-yui, base64-duh, base64-yui (input)\n  b64-dh, b64-xml-name, base64-dh, base64-xml-name (input)\n  b64-uc, b64-xml-id, base64-uc, base64-xml-id (input)\n  b64-uh, b64-prog-id-1, base64-uh, base64-prog-id-1 (input)\n  b64-du, b64-prog-id-2, base64-du, base64-prog-id-2 (input)\n  b64-xh, b64-regex, base64-xh, base64-regex (input)\n  r2, rad2, radix2 (input)\n  r3, rad3, radix3 (input)\n  r4, rad4, radix4 (input)\n  r5, rad5, radix5 (input)\n  r6, rad6, radix6 (input)\n  r7, rad7, radix7 (input)\n  r8, rad8, radix8 (input)\n  r9, rad9, radix9 (input)\n  r10, rad10, radix10 (input)\n  r11, rad11, radix11 (input)\n  r12, rad12, radix12 (input)\n  r13, rad13, radix13 (input)\n  r14, rad14, radix14 (input)\n  r15, rad15, radix15 (input)\n  r16, rad16, radix16 (input)\n  r17, rad17, radix17 (input)\n  r18, rad18, radix18 (input)\n  r19, rad19, radix19 (input)\n  r20, rad20, radix20 (input)\n  r21, rad21, radix21 (input)\n  r22, rad22, radix22 (input)\n  r23, rad23, radix23 (input)\n  r24, rad24, radix24 (input)\n  r25, rad25, radix25 (input)\n  r26, rad26, radix26 (input)\n  r27, rad27, radix27 (input)\n  r28, rad28, radix28 (input)\n  r29, rad29, radix29 (input)\n  r30, rad30, radix30 (input)\n  r31, rad31, radix31 (input)\n  r32, rad32, radix32 (input)\n  r33, rad33, radix33 (input)\n  r34, rad34, radix34 (input)\n  r35, rad35, radix35 (input)\n  r36, rad36, radix36 (input)\n  deflate (input)\n  gzip, gz (input)\n  and-trunc (input, input)\n  or-trunc (input, input)\n  xor-trunc (input, input)\n  and (input, input)\n  or (input, input)\n  xor (input, input)\n  not (input)\n  url, uri, cgi (input)\n  cat, catenate (input)\n  repack (input, ch1, ch2)\n  tr, translate (input, ch1, ch2)\n  repl, replace (input, search, replace)\n  rc4-ruby (input, key)\n```\n\n## Developing\nCheck out code:\n```shell\ngit clone https://github.com/frohoff/ciphr.git\ncd ciphr\n```\n\nRun command from exploded gem/project directory:\n```shell\nbundle exec ruby -Ilib bin/ciphr [args]\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","funding_links":[],"categories":["CTFs"],"sub_categories":["CTFs tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrohoff%2Fciphr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrohoff%2Fciphr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrohoff%2Fciphr/lists"}