{"id":13542364,"url":"https://github.com/KINGSABRI/jwtear","last_synced_at":"2025-04-02T10:30:41.824Z","repository":{"id":41203481,"uuid":"115943131","full_name":"KINGSABRI/jwtear","owner":"KINGSABRI","description":"Modular command-line tool to parse, create and manipulate JWT tokens for hackers","archived":false,"fork":false,"pushed_at":"2023-03-17T05:29:08.000Z","size":94,"stargazers_count":101,"open_issues_count":2,"forks_count":24,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-14T19:04:49.418Z","etag":null,"topics":["jwe","jws","jwt","jwt-authentication","parsing","pentest","session","token"],"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/KINGSABRI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-01-01T19:47:50.000Z","updated_at":"2024-01-24T10:50:48.000Z","dependencies_parsed_at":"2024-01-14T08:58:53.244Z","dependency_job_id":"67f6dca3-d0fb-4abc-8e74-f5ffef4e1cbb","html_url":"https://github.com/KINGSABRI/jwtear","commit_stats":{"total_commits":75,"total_committers":2,"mean_commits":37.5,"dds":"0.013333333333333308","last_synced_commit":"7b68d5f95598b5a9cd44a4a56eed83488f5ebb66"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KINGSABRI%2Fjwtear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KINGSABRI%2Fjwtear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KINGSABRI%2Fjwtear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KINGSABRI%2Fjwtear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KINGSABRI","download_url":"https://codeload.github.com/KINGSABRI/jwtear/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246796759,"owners_count":20835441,"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":["jwe","jws","jwt","jwt-authentication","parsing","pentest","session","token"],"created_at":"2024-08-01T10:01:05.558Z","updated_at":"2025-04-02T10:30:41.401Z","avatar_url":"https://github.com/KINGSABRI.png","language":"Ruby","readme":"# Jwtear\nA modular command-line tool to parse, create and manipulate JSON Web Token(JWT) tokens for security testing purposes. \n\n## Features\n- Complete modularity.\n    - All commands are plugins.\n    - Easy to add new plugins.\n    - Support JWS and JWE tokens.  \n- Easy interface for plugins. (follow the template example)\n- Flexible\n- token generation based on production-class libraries (e.g. json-jwt, jwe).\n\n\n### Available plugins\n- Parse: parses jwt tokens.\n- jws: manipulate and generate JWS tokens.\n- jwe: manipulate and generate JWE tokens.\n- bruteforce: brutefocing JWS signing key\n- wiki: contains offline information about JWT, attacks ideas, references.\n\n## Installation\n\ninstall it yourself as:\n\n    $ gem install jwtear\n\n## Usage\n\n- Show the main menu \n```\n    888888 888       888 88888888888\n      \"88b 888   o   888     888\n       888 888  d8b  888     888\n       888 888 d888b 888     888   .d88b.   8888b.  888d888\n       888 888d88888b888     888  d8P  Y8b     \"88b 888P\"\n       888 88888P Y88888     888  88888888 .d888888 888\n       88P 8888P   Y8888     888  Y8b.     888  888 888\n       888 888P     Y888     888   \"Y8888  \"Y888888 888\n     .d88P                                       v1.0.0\n   .d88P\"\n  888P\"    \nNAME\n    jwtear - Parse, create and manipulate JWT tokens.\n\nSYNOPSIS\n    jwtear [global options] command [command options] [arguments...]\n\nGLOBAL OPTIONS\n    -v, --version - Check current and latest version\n    -h, --help    - Show this help message\n\nCOMMANDS\n    help            - Shows a list of commands or help for one command\n    bruteforce, bfs - plugin to offline bruteforce and crack token's signature.\n    jws, s          - Generate signature-based JWT (JWS) token.\n    jwe, e          - Generate encryption-based JWT (JWE) token.\n    parse           - Parse JWT token (accepts JWS and JWE formats).\n    wiki, w         - A JWT wiki for hackers.\n```\n\n- Show a subcommand help, use `-h COMMAND`\n\n```\n$jwtear -h jws\n\nNAME\n    jws - Generate signature-based JWT (JWS) token.\n\nSYNOPSIS\n    jwtear [global options] jws [command options] \n\nDESCRIPTION\n    Generate JWS and JWE tokens. \n\nCOMMAND OPTIONS\n    -h, --header=JSON               - JWT header (JSON format). eg. {\"typ\":\"JWT\",\"alg\":\"HS256\"}. Run 'jwtear gen -l' for supported algorithms. (required, default: none)\n    -p, --payload=JSON              - JWT payload (JSON format). eg. {\"login\":\"admin\"} (required, default: none)\n    -k, --key=PASSWORD|PUB_KEY_FILE - Key as a password string or a file public key. eg. P@ssw0rd  | eg. public_key.pem (default: none)\n```\n\n- Use a plugin\n\nplugins are defined as subcommands. Each subcommand may have one or more argument and/or switches.\n```\n$ jwtear parse -t eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.J8SS8VKlI2yV47C4BtfYukWPx_2welF34Mz7l-MNmkE\n$ jwtear jws -h '{\"alg\":\"HS256\",\"typ\":\"JWT\"}' -p '{\"user\":\"admin\"}' -k p@ss0rd123\n$ jwtear jwe -header '{\"enc\":\"A192GCM\",\"typ\":\"JWT\"}' --payload '{\"user\":\"admin\"}' --key public.pem \n$ jwtear bruteforce -v -t eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjpudWxsfQ.Tr0VvdP6rVBGBGuI_luxGCOaz6BbhC6IxRTlKOW8UjM -l ~/tmp/pass.list\n```\n\n## Add plugin\nTo add a new plugin, create a new ruby file under `plugins` directory with the following structure\n```ruby\nmodule JWTear\n  module CLI\n    extend GLI::App\n    extend JWTear::Helpers::Extensions::Print\n    extend JWTear::Helpers::Utils\n\n    desc \"Plugin short description\"\n    long_desc \"Plugin long description\"\n    command [:template, :pt] do |c|\n      c.action do |global, options, arguments|\n        print_h1 \"Plugin template\"\n        print_good \"Hi, I'm a template.\"\n        template = TemplatePlugin.new\n      end\n    end\n  end\n\n  module Plugin\n    class TemplatePlugin\n      include JWTear::Helpers::Extensions::Print\n      include JWTear::Helpers::Utils\n\n      def initialize\n        check_dependencies\n        # ..code...\n      end\n     \n      # ..code...\n    end\n  end\nend\n```\nInstead of including all dependencies for each plugin into jwtear, you can add these dependencies as a hash to `check_dependencies` method which will require the library and throw a gentle error to the user to install any missing gems.\n\nThe hash _key_ is the gem name to install, the hash _value_ is the `require` string \n```ruby\ndeps = {'async-io' =\u003e 'async/ip'}\ncheck_dependencies(deps)\n```\nOnce the missing dependencies are installed by the user, the `check_dependencies` will require them once the plugin class initiated.\n\n\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jwtear.\n\n1. Fork it ( https://github.com/KINGSABRI/jwtear/fork )\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 a new Pull Request\n\n### Areas to contribute\n- contribution by reporting bugs.\n- contribution by perfecting the current code.\n- contribution by adding new plugins.\n- contribution by enhancing the [jwtear wiki](https://github.com/KINGSABRI/jwtear/tree/master/plugins/wiki).\n- contribution by requesting features and/or plugins.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["Miscellaneous","Ruby","Tools / Applications / Scripts"],"sub_categories":["JSON Web Token"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKINGSABRI%2Fjwtear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKINGSABRI%2Fjwtear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKINGSABRI%2Fjwtear/lists"}