Skip to main content

unicode obfuscate

Replace unicode characters with visually similar ones.

Instalation

Be sure to use python >= 3.7

pip install unicode_obfuscate

Usage

Simple usage:

>>> from unicode_obfuscate import Obfuscator
>>> text = "And Now for Something Completely Different"
>>> obfuscator = Obfuscator()
>>> new_text = obfuscator.obfuscate(text)
>>> new_text
'Αnd Νοw fοr Ѕοmеtһіng Сοmрlеtеlу Dіffеrеnt'
>>> text == new_text
False

# You can also pass a probability to change only some characters.
>>> obfuscator.obfuscate(text, prob=0.3) 
'And Νow for Ѕomething Сompletely Different'

There are two different datasets to map the characters:

  • intencional: A very short list with very similar characters (Only one option for each character). The data is taken from here.
  • confusables: A gigantic list of characters (and multiple possible characters for each one). The data is taken from here.

By default, intencional is used but it can change with keyword kind:

# this uses the dataset 'intencional'
>>> obfuscator = Obfuscator()  

# this uses the dataset 'confusables'
>>> obfuscator = Obfuscator(kind="confusables")  

Release files for unicode-obfuscate 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unicode-obfuscate 0.1.1
File Size Uploaded
unicode_obfuscate-0.1.1.tar.gz 39.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unicode-obfuscate 0.1.1
File Interpreter ABI Platform
unicode_obfuscate-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 80.4 kB

Release files / unicode_obfuscate-0.1.1.tar.gz

Download URL unicode_obfuscate-0.1.1.tar.gz
Size 39.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e82f27695bc8748d0b4869ee1adda1c41aff36661aa2ea06c6416c5329334d90
BLAKE2b-256 checksum
How to use checksums
b56dbbcb0a093c4ddd098d06a8bfe8ba97436ad587998159b80a3f0e49cd2571
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.7.6 Linux/5.6.0-2-amd64

Release files / unicode_obfuscate-0.1.1-py3-none-any.whl

Download URL unicode_obfuscate-0.1.1-py3-none-any.whl
Size 40.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d43c0d9035004369ef07e7e2c7fbb939334b40491763057e96aa650bbc38f5b
BLAKE2b-256 checksum
How to use checksums
98d50f02f87e129c0fe4fa0e6702a23a794135ce01d8e2da1519a9593d24c093
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.7.6 Linux/5.6.0-2-amd64

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page