confusable-homoglyphs


Nameconfusable-homoglyphs JSON
Version 3.3.1 PyPI version JSON
download
home_pagehttps://github.com/vhf/confusable_homoglyphs
SummaryDetect confusable usage of unicode homoglyphs, prevent homograph attacks.
upload_time2024-01-30 10:10:27
maintainer
docs_urlNone
authorVictor Felder
requires_python
licenseMIT
keywords confusable homoglyph attack homograph unicode spoofing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            confusable_homoglyphs `[doc] <http://confusable-homoglyphs.readthedocs.io/en/latest/>`__
========================================================================================

This project has been adopted from `the original confusable_homoglyphs
by Victor Felder
<https://github.com/vhf/confusable_homoglyphs/tree/master>`_.

.. image:: https://builds.sr.ht/~valhalla/confusable_homoglyphs.svg
      :target: https://builds.sr.ht/~valhalla/confusable_homoglyphs
      :alt: Build Status

.. image:: https://img.shields.io/pypi/v/confusable_homoglyphs.svg
      :target: https://pypi.python.org/pypi/confusable_homoglyphs
      :alt: Version on PyPi

.. image:: https://readthedocs.org/projects/confusable_homoglyphs/badge/?version=latest
      :target: http://confusable-homoglyphs.readthedocs.io/en/latest/
      :alt: Documentation Status

*a homoglyph is one of two or more graphemes, characters, or glyphs with
shapes that appear identical or very similar*
`wikipedia:Homoglyph <https://en.wikipedia.org/wiki/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 <http://unicode.org/cldr/utility/confusables.jsp>`__ 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 when our preferred script alias is 'latin': mixed
  script, but ``Γ`` is not confusable.
- ``Alloρ`` is dangerous: mixed script and ``ρ`` could be confused with
  ``p``.

This library is compatible with Python 3.

`API documentation <http://confusable-homoglyphs.readthedocs.io/en/latest/apidocumentation.html>`__
---------------------------------------------------------------------------------------------------

Is the data up to date?
-----------------------

Yep.

The unicode blocks aliases and names for each character are extracted
from `this file <http://www.unicode.org/Public/UNIDATA/Scripts.txt>`__
provided by the unicode consortium.

The matrix of which character can be confused with which other
characters is built using `this
file <http://www.unicode.org/Public/security/latest/confusables.txt>`__
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
=====

Initial release.

2.0.0
=====

- `allowed_categories` renamed to `allowed_aliases`

2.0.1
=====

- Fix a TypeError: https://github.com/vhf/confusable_homoglyphs/pull/2

3.0.0
=====

Courtesy of Ryan P Kilby, via https://github.com/vhf/confusable_homoglyphs/pull/6 :

- Changed file paths to be relative to the `confusable_homoglyphs`
  package directory instead of the user's current working directory.
- Data files are now distributed with the packaging.
- Fixes tests so that they use the installed distribution instead of the
  local files. (Originally, the data files were erroneously showing up
  during testing, despite not being included in the distribution).
- Moves the data file generation into a simple CLI. This way, users have
  a method for controlling when the data files are updated.
- Since the data files are now included in the distribution, the CLI is
  made optional. Its dependencies can be installed with the `cli`
  bundle, eg. `pip install confusable_homoglyphs[cli]`.

3.1.0
=====

- Update unicode data

3.1.1
=====

- Update unicode data (via ftp)

3.2.0
=====

- Drop support for Python 3.3
- Fix #11: work as expected when char not found in datafiles

3.3.0
=====

- Drop support for Python 2
- Drop support for Python < 3.7, add support for Python up to 3.12
- Allow using data files from a custom location set with the
  CONFUSABLE_DATA environment variable.
- Fix the return value of confusables.is_dangerous() to the documented
  API of a boolean value. It used to return either False or the list
  output of confusable.is_confusable().
- Added a check command for command line use.

3.3.1
=====

- Update unicode data

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vhf/confusable_homoglyphs",
    "name": "confusable-homoglyphs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "confusable,homoglyph,attack,homograph,unicode,spoofing",
    "author": "Victor Felder",
    "author_email": "victorfelder@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0d/10/1358fca1ee2d97d4f2877df9ffbe6d124da666fef3b2f75e771a4c1afee6/confusable_homoglyphs-3.3.1.tar.gz",
    "platform": null,
    "description": "confusable_homoglyphs `[doc] <http://confusable-homoglyphs.readthedocs.io/en/latest/>`__\n========================================================================================\n\nThis project has been adopted from `the original confusable_homoglyphs\nby Victor Felder\n<https://github.com/vhf/confusable_homoglyphs/tree/master>`_.\n\n.. image:: https://builds.sr.ht/~valhalla/confusable_homoglyphs.svg\n      :target: https://builds.sr.ht/~valhalla/confusable_homoglyphs\n      :alt: Build Status\n\n.. image:: https://img.shields.io/pypi/v/confusable_homoglyphs.svg\n      :target: https://pypi.python.org/pypi/confusable_homoglyphs\n      :alt: Version on PyPi\n\n.. image:: https://readthedocs.org/projects/confusable_homoglyphs/badge/?version=latest\n      :target: http://confusable-homoglyphs.readthedocs.io/en/latest/\n      :alt: Documentation Status\n\n*a homoglyph is one of two or more graphemes, characters, or glyphs with\nshapes that appear identical or very similar*\n`wikipedia:Homoglyph <https://en.wikipedia.org/wiki/Homoglyph>`__\n\nUnicode homoglyphs can be a nuisance on the web. Your most popular\nclient, AlaskaJazz, might be upset to be impersonated by a trickster who\ndeliberately chose the username \u0391laskaJazz.\n\n-  ``AlaskaJazz`` is single script: only Latin characters.\n-  ``\u0391laskaJazz`` is mixed-script: the first character is a greek\n   letter.\n\nYou might also want to avoid people being tricked into entering their\npassword on ``www.micros\ufeff\u043eft.com`` or ``www.fa\u03f2ebook.com`` instead of\n``www.microsoft.com`` or ``www.facebook.com``. `Here is a\nutility <http://unicode.org/cldr/utility/confusables.jsp>`__ to play\nwith these **confusable homoglyphs**.\n\nNot all mixed-script strings have to be ruled out though, you could only\nexclude mixed-script strings containing characters that might be\nconfused with a character from some unicode blocks of your choosing.\n\n- ``Allo`` and ``\u03c1\u03c4\u03c4`` are fine: single script.\n- ``Allo\u0393`` is fine when our preferred script alias is 'latin': mixed\n  script, but ``\u0393`` is not confusable.\n- ``Allo\u03c1`` is dangerous: mixed script and ``\u03c1`` could be confused with\n  ``p``.\n\nThis library is compatible with Python 3.\n\n`API documentation <http://confusable-homoglyphs.readthedocs.io/en/latest/apidocumentation.html>`__\n---------------------------------------------------------------------------------------------------\n\nIs the data up to date?\n-----------------------\n\nYep.\n\nThe unicode blocks aliases and names for each character are extracted\nfrom `this file <http://www.unicode.org/Public/UNIDATA/Scripts.txt>`__\nprovided by the unicode consortium.\n\nThe matrix of which character can be confused with which other\ncharacters is built using `this\nfile <http://www.unicode.org/Public/security/latest/confusables.txt>`__\nprovided by the unicode consortium.\n\nThis data is stored in two JSON files: ``categories.json`` and\n``confusables.json``. If you delete them, they will both be recreated by\ndownloading and parsing the two abovementioned files and stored as JSON\nfiles again.\n\n\n\n\nHistory\n-------\n\n1.0.0\n=====\n\nInitial release.\n\n2.0.0\n=====\n\n- `allowed_categories` renamed to `allowed_aliases`\n\n2.0.1\n=====\n\n- Fix a TypeError: https://github.com/vhf/confusable_homoglyphs/pull/2\n\n3.0.0\n=====\n\nCourtesy of Ryan P Kilby, via https://github.com/vhf/confusable_homoglyphs/pull/6 :\n\n- Changed file paths to be relative to the `confusable_homoglyphs`\n  package directory instead of the user's current working directory.\n- Data files are now distributed with the packaging.\n- Fixes tests so that they use the installed distribution instead of the\n  local files. (Originally, the data files were erroneously showing up\n  during testing, despite not being included in the distribution).\n- Moves the data file generation into a simple CLI. This way, users have\n  a method for controlling when the data files are updated.\n- Since the data files are now included in the distribution, the CLI is\n  made optional. Its dependencies can be installed with the `cli`\n  bundle, eg. `pip install confusable_homoglyphs[cli]`.\n\n3.1.0\n=====\n\n- Update unicode data\n\n3.1.1\n=====\n\n- Update unicode data (via ftp)\n\n3.2.0\n=====\n\n- Drop support for Python 3.3\n- Fix #11: work as expected when char not found in datafiles\n\n3.3.0\n=====\n\n- Drop support for Python 2\n- Drop support for Python < 3.7, add support for Python up to 3.12\n- Allow using data files from a custom location set with the\n  CONFUSABLE_DATA environment variable.\n- Fix the return value of confusables.is_dangerous() to the documented\n  API of a boolean value. It used to return either False or the list\n  output of confusable.is_confusable().\n- Added a check command for command line use.\n\n3.3.1\n=====\n\n- Update unicode data\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Detect confusable usage of unicode homoglyphs, prevent homograph attacks.",
    "version": "3.3.1",
    "project_urls": {
        "Homepage": "https://github.com/vhf/confusable_homoglyphs"
    },
    "split_keywords": [
        "confusable",
        "homoglyph",
        "attack",
        "homograph",
        "unicode",
        "spoofing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c56ec0fcbb7d341a46cf4241a6aa9e6a737734f0657521fc1bcd074953fe4eea",
                "md5": "d0e360dfe2222f73e8f0e26942b563d6",
                "sha256": "84c92cb79dc7f55aa290d0762b2349abd8dee4c16fbe6f99eac978d394e2e6a1"
            },
            "downloads": -1,
            "filename": "confusable_homoglyphs-3.3.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d0e360dfe2222f73e8f0e26942b563d6",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 144755,
            "upload_time": "2024-01-30T10:10:24",
            "upload_time_iso_8601": "2024-01-30T10:10:24.857431Z",
            "url": "https://files.pythonhosted.org/packages/c5/6e/c0fcbb7d341a46cf4241a6aa9e6a737734f0657521fc1bcd074953fe4eea/confusable_homoglyphs-3.3.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d101358fca1ee2d97d4f2877df9ffbe6d124da666fef3b2f75e771a4c1afee6",
                "md5": "b0d8f9c189827ad7292fb00d17e2aecf",
                "sha256": "b995001c9b2e1b4cea0cf5f3840a7c79188a8cbbad053d693572bd8c1c1ec460"
            },
            "downloads": -1,
            "filename": "confusable_homoglyphs-3.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b0d8f9c189827ad7292fb00d17e2aecf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 325480,
            "upload_time": "2024-01-30T10:10:27",
            "upload_time_iso_8601": "2024-01-30T10:10:27.470727Z",
            "url": "https://files.pythonhosted.org/packages/0d/10/1358fca1ee2d97d4f2877df9ffbe6d124da666fef3b2f75e771a4c1afee6/confusable_homoglyphs-3.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-30 10:10:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vhf",
    "github_project": "confusable_homoglyphs",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "confusable-homoglyphs"
}
        
Elapsed time: 0.17719s