a homoglyph is one of two or more graphemes, characters, or glyphs with shapes that appear identical or very similar wikipedia:Homoglyph
Unicode homoglyphs can be a nuisance on the web. Your most popular client, AlaskaJazz, might be upset to be impersonated by a trickster who deliberately chose the username ΑlaskaJazz.
AlaskaJazz is single script: only Latin characters.
ΑlaskaJazz is mixed-script: the first character is a greek letter.
You might also want to avoid people being tricked into entering their password on www.microsоft.com or www.faϲebook.com instead of www.microsoft.com or www.facebook.com. Here is a utility to play with these confusable homoglyphs.
Not all mixed-script strings have to be ruled out though, you could only exclude mixed-script strings containing characters that might be confused with a character from some unicode blocks of your choosing.
Allo and ρττ are fine: single script.
Alloτ is fine: mixed script, but τ is not confusable.
Alloρ is dangerous: mixed script and ρ could be confused with p.
This library is compatible Python 2 and Python 3.
Documentation
Is the data up to date?
Yep.
The unicode blocks aliases and names for each character are extracted from this file provided by the unicode consortium.
The matrix of which character can be confused with which other characters is built using this file provided by the unicode consortium.
This data is stored in two JSON files: categories.json and confusables.json. If you delete them, they will both be recreated by downloading and parsing the two abovementioned files and stored as JSON files again.
History
1.0.0 (2016)
Initial release.
Metadata
Release files for confusable-homoglyphs 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| confusable_homoglyphs-1.0.1.tar.gz | 30.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| confusable_homoglyphs-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 40.2 kB
Release files / confusable_homoglyphs-1.0.1.tar.gz
| Download URL | confusable_homoglyphs-1.0.1.tar.gz |
|---|---|
| Size | 30.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1b4ceaa7c95795e0e490aa40ce2aa315620048199d7fa334bcad7996fc0bbed
|
|
BLAKE2b-256 checksum How to use checksums |
2ed558362f582334863bc0a9c42ee9106817f83fb5647a7a7c4ee025773930f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / confusable_homoglyphs-1.0.1-py2.py3-none-any.whl
| Download URL | confusable_homoglyphs-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6390602460694ba1939f859e613fdf4406d2d8dfe9056a6fc52383255be57488
|
|
BLAKE2b-256 checksum How to use checksums |
10393ffe2bd1633a44b61b2150ad3a8ffd5ee13cb7de4986cf5fc7a0fba8d9e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for confusable-homoglyphs 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.