{"id":19078348,"url":"https://github.com/kickstarter/ruby-homograph-detector","last_synced_at":"2025-10-20T04:17:08.032Z","repository":{"id":56876605,"uuid":"137376591","full_name":"kickstarter/ruby-homograph-detector","owner":"kickstarter","description":"🕵️‍♀️🕵️‍♂️ Ruby gem for determining whether a given URL is considered an IDN homograph attack","archived":false,"fork":false,"pushed_at":"2018-07-03T20:03:44.000Z","size":11,"stargazers_count":30,"open_issues_count":0,"forks_count":2,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-30T04:48:33.251Z","etag":null,"topics":["homograph-attack","idn-homograph-attack","security","unicode"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kickstarter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-14T15:29:14.000Z","updated_at":"2025-01-16T20:43:23.000Z","dependencies_parsed_at":"2022-08-20T22:00:47.391Z","dependency_job_id":null,"html_url":"https://github.com/kickstarter/ruby-homograph-detector","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kickstarter%2Fruby-homograph-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kickstarter%2Fruby-homograph-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kickstarter%2Fruby-homograph-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kickstarter%2Fruby-homograph-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kickstarter","download_url":"https://codeload.github.com/kickstarter/ruby-homograph-detector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251644827,"owners_count":21620630,"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":["homograph-attack","idn-homograph-attack","security","unicode"],"created_at":"2024-11-09T02:08:34.146Z","updated_at":"2025-10-20T04:17:02.998Z","avatar_url":"https://github.com/kickstarter.png","language":"Ruby","funding_links":["https://paypal.com"],"categories":[],"sub_categories":[],"readme":"# ruby-homograph-detector\n\nRuby gem for determining whether a given URL is considered an [IDN homograph attack]. The underlying algorithm used in this gem is loosely based on [Google Chrome’s IDN display algorithm]. To learn more about why and how you defend against homograph attacks, see [this blog post].\n\n[IDN homograph attack]: https://en.wikipedia.org/wiki/IDN_homograph_attack\n[Google Chrome’s IDN display algorithm]: https://www.chromium.org/developers/design-documents/idn-in-google-chrome\n[this blog post]: https://dev.to/loganmeetsworld/homographs-attack--5a1p\n\n## Installation\n\nInstall the `homograph-detector` gem, or add it to your Gemfile with bundler:\n\n```ruby\n# In your Gemfile\ngem 'homograph-detector'\n```\n\n## Usage\n\nThe `homograph-detector` gem provides a single function `homograph_attack?` which takes a URL string and determines if the URL is considered a homograph attack:\n\n```ruby\nHomographDetector.homograph_attack?('\u003cyour URL here\u003e')\n```\n\n## Examples\n\nURL with Latin characters:\n\n\n```ruby\nHomographDetector.homograph_attack?('https://paypal.com') # false\n```\n\nURL with [confusable] Cyrillic characters:\n\n```ruby\nHomographDetector.homograph_attack?('https://раураӏ.com') # true\n```\n\nURL with non-confusable Cyrillic characters:\n\n```ruby\nHomographDetector.homograph_attack?('http://яндекс.рф') # false\n```\n\nURL with multiple scripts:\n\n```ruby\n# Greek and Latin\nHomographDetector.homograph_attack?('wikiρedia.org') # true\n\n# Japanese and Latin\nHomographDetector.homograph_attack?('hello你好.com') # false\n```\n\n[confusable]: http://www.unicode.org/reports/tr39/#Confusable_Detection\n\n## License\n\nLicensed under Apache License, Version 2.0 ([LICENSE.txt](LICENSE.txt) or http://www.apache.org/licenses/LICENSE-2.0).\n\nFor a summary of the licenses used by ruby-homograph-detector’s dependencies, see [NOTICE.md](NOTICE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkickstarter%2Fruby-homograph-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkickstarter%2Fruby-homograph-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkickstarter%2Fruby-homograph-detector/lists"}