{"id":15729887,"url":"https://github.com/jj/raku-unicode-security","last_synced_at":"2025-04-24T00:06:58.502Z","repository":{"id":54731346,"uuid":"182813670","full_name":"JJ/raku-unicode-security","owner":"JJ","description":"Check Unicode strings for possible confusing graphemes","archived":false,"fork":false,"pushed_at":"2024-10-06T07:37:16.000Z","size":167,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T00:06:51.880Z","etag":null,"topics":["alphabets","graphemes","hacktoberfest","unicode","unicode-consortium"],"latest_commit_sha":null,"homepage":"","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-22T15:17:27.000Z","updated_at":"2024-10-06T07:37:20.000Z","dependencies_parsed_at":"2023-01-27T19:25:19.551Z","dependency_job_id":null,"html_url":"https://github.com/JJ/raku-unicode-security","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JJ%2Fraku-unicode-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JJ%2Fraku-unicode-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JJ%2Fraku-unicode-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JJ%2Fraku-unicode-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JJ","download_url":"https://codeload.github.com/JJ/raku-unicode-security/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535103,"owners_count":21446508,"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":["alphabets","graphemes","hacktoberfest","unicode","unicode-consortium"],"created_at":"2024-10-03T23:41:08.022Z","updated_at":"2025-04-24T00:06:58.466Z","avatar_url":"https://github.com/JJ.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME [![Test-install distro](https://github.com/JJ/raku-unicode-security/actions/workflows/test.yaml/badge.svg)](https://github.com/JJ/raku-unicode-security/actions/workflows/test.yaml)\n====\n\nUnicode::Security - Check scripts for confusables and mixed script strings\n\nSYNOPSIS\n========\n\n```perl6\nuse v6.d;\nuse Unicode::Security;\n\nsay \"Nope\" if mixed-script( \"abcdef\" );\nsay \"Yea\" if mixed-script( \"aαbβ\" );\n\nsay \"Looks fake, Rick\" if confusable('paypal',\n\t\t\t\t     \"p\\x[0430]yp\\x[0430]l\");\nsay \"No problem\" unless confusable('Paypal', 'paypal');\n\nsay \"Not confusing\" unless whole-script-confusable(\"Latin\", \"DFRVz\");\nsay \"Confusing\" if whole-script-confusable(\"Cyrillic\", \"scope\");\n```\n\nDESCRIPTION\n===========\n\n`Unicode::Security` is a (partial) transcription of its namesake Perl\nmodule. It incorporates confusion tables from the Unicode consortium\nto detect which graphemes can cause confusion between two alphabets,\nor which strings could be confused between two or more alphabets; also\ndetect when some strings have mixed scripts, which can be used to slip\nby literal-string detectors.\n\nThe list of confusables is generated from the list published by the\nunicode consortium using the scripts in `resources/script`. You should\nhave received a copy along with this. The scripts generate two JSON\nfiles, which must be moved by hand to the `resources/data`\ndirectory. You don't need to do this unless you're certain that the\nsupplied copy is *really* out of sync with the real ones.\n\nMETHODS\n=======\n\nsub confusable( $string-a, $string-b )\n--------------------------------------\n\nReturns true if one string could be confusable for the other.\n\nsub whole-script-confusable( $script, $string )\n-----------------------------------------------\n\nReturns True if the string would be confusable for another written in the indicated script\n\nsub mixed-script( $str )\n------------------------\n\nReturns `True` if the string includes several scripts, `False` otherwise\n\nsub mixed-script-confusable( $str )\n-----------------------------------\n\nReturns `True` if the scripts present in a string could make it\nconfusable for any of them.\n\n## Upgrading\n\nThis modules uses a couple of scripts to generate the tables used in it. It will be updated from time to time, but you can also update it by running the scripts included. It will need `LWP::Simple` and `IO::Socket::SSL` installed, besides those in `META6.json`\n\nAUTHOR\n======\n\nJJ Merelo \u003cjjmerelo@gmail.com\u003e\n\nCOPYRIGHT AND LICENSE\n=====================\n\nCopyright 2019,2022 JJ Merelo\n\nThis library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjj%2Fraku-unicode-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjj%2Fraku-unicode-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjj%2Fraku-unicode-security/lists"}