{"id":31913590,"url":"https://github.com/zhibirc/redos","last_synced_at":"2025-10-13T18:51:18.703Z","repository":{"id":227966200,"uuid":"606839993","full_name":"zhibirc/redos","owner":"zhibirc","description":"ReDoS in Node.js land with demo, side notes and fun.","archived":false,"fork":false,"pushed_at":"2023-04-23T17:15:25.000Z","size":1077,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-16T17:27:45.689Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/zhibirc.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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}},"created_at":"2023-02-26T18:08:41.000Z","updated_at":"2023-02-26T19:38:59.000Z","dependencies_parsed_at":"2024-03-22T09:47:55.764Z","dependency_job_id":null,"html_url":"https://github.com/zhibirc/redos","commit_stats":null,"previous_names":["zhibirc/redos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhibirc/redos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhibirc%2Fredos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhibirc%2Fredos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhibirc%2Fredos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhibirc%2Fredos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhibirc","download_url":"https://codeload.github.com/zhibirc/redos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhibirc%2Fredos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016623,"owners_count":26085853,"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-10-13T02:00:06.723Z","response_time":61,"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":"2025-10-13T18:49:56.922Z","updated_at":"2025-10-13T18:51:18.690Z","avatar_url":"https://github.com/zhibirc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReDoS\n\nReDoS in Node.js land with demo, side notes and fun.\n\n![screenshot](/assets/images/screenshot.png)\n\n## Usage\n\n```shell\n# node index.js CHARACTER_LIST [DELAY]\n# where CHARACTER_LIST is JSON Array and DELAY is number of milliseconds\nnode index.js '[\"a\", \"([a-z]+)\"]'\n```\n\n## Testing algorithm\n\n1. Start from the entrypoint described in [usage](#usage) section with mandatory **character list** and **optional delay**.\n2. If **delay** number of milliseconds was given then use it, otherwise use delay of **120** seconds.\n3. Check for CPU cores number to setting up parallel execution.\n4. Also validate for arguments and if **character list** is absent or malformed throw an error.\n5. Generate all possible valid regular expressions from given character list and meta-characters `(`, `)`, `|`, `+`, `*`.\n6. Generate random string from given alphabet characters of length **20** (default) with one different symbol at the end.\n7. For each thread create a Promise-based job which have the following responsibility:\n   - fork worker process and add it to worker pool\n   - listen for message (IPC) from corresponding worker and do the following:\n     - save given statistics\n     - if there are no regular expressions for matching (nothing to do) kill this worker and resolve the job\n     - otherwise send to worker new portion of data to handle\n8. Send portion of data to handle to each worker in worker pool to start computations.\n9. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhibirc%2Fredos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhibirc%2Fredos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhibirc%2Fredos/lists"}