{ "info": { "author": "Hossein Ghodse", "author_email": "hossein.ghodse@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# *obf* - an obfuscation tool and library\n\n*obf* is designed to obfuscate an input document, whilst ensuring that the output is still (somewhat) human-readable and \nwhile also maintaining consistency of mapping between an input plaintext and an obfuscated output, such that \nobf(plaintext) always yields the same result.\n\nThis latter characteristic means that *obf* is not really suitable for strong encryption, as frequency analysis of the \noutput ciphertext, perhaps with the assistance of a crib, could make the output comprehensible to an attacker.\n\nThe intent of *obf* is to allow the sharing of potentially sensitive data outside of a protected zone while ensuring \nit's continued consistency, and thus operability without requiring any changes to other tools and tooling.\n\n*obf* was developed as a tool to allow the copying of data (files and databases) from a protected \"green\" network to \nunprotected \"red\" zones, including developer workstations and laptops while maintaining reasonable data privacy. *obf* \nis intended to be used either as a standalone tool or as a library in an automated data-copy process. \n\n**Installation instructions**\n-----------------------------\n*obf* is written in Python, and you can use the pip installer to install it thus:\n\n```\n$ pip install obf\n```\n\n**Usage**\n---------\n```\nobf [-h] [-b [blockedwords file]] [-w [codewords file]] [-c]\n [-n [N]] [-e [E]] [-a [ALGO]] [-s [SALT]] [-l] [-v]\n [plaintext]\n\n```\n\n#### positional arguments:\n\n ```plaintext ```A plaintext to obfuscate. If no plaintext is provided,\n then obf will look at stdin instead.\n\n#### optional arguments:\n\n```-h, --help``` show this help message and exit\n\n```-b [blockedwords file]```\n A file containing specific words to block. If missing\n the entire input is obfuscated.\n\n```-w [codewords file]``` A file containing code words to use.\n\n```-c ``` Display a crib showing the mapping of blocked values\n to their obfuscated values. Only works when a specific\n blockfile is used with the -b option.\n\n```-n [N]``` An index to indicate which bytes of the generated hash\n to use as a lookup into the codewords file. Defaults\n to 0.\n\n```-e [E]``` A string of comma-separated domain name components\n that should be exempt from obfuscation to aid\n readability. Dots are not permitted/valid. Defaults to\n 'com,co,uk,org' and any that are specified on the\n command line are added to this list.\n\n```-a [ALGO], --algo [ALGO]```\n The hash algorithm to use as a basis for indexing the\n codewords file; defaults to SHA256\n\n``` -s [SALT], --salt [SALT]```\n A salt for the hash function to ensure uniqueness of\n encoding.\n\n``` -l, --list-algos``` List available hash algorithms.\n\n```-v ``` Verbose mode = show key parameters, etc\n\n\n\n\n**Examples**\n------------\n\n```\n$ obf hello\nSPRIGHTFUL\n\n```\n```\n$ cat plaintext.txt | obf\nLITHARGE LUNE FELINES PROPHECY FORBORNE ANKLUNGS SPAMS VOYAGE WIVERNS. OUBLIETTES RESTRICTIONS, TRIPTYCHS DREAMING BOLETUS STIRRING THYME BURK TWINS FELINES FRETS PEMMICAN.\nSTUBBORNNESS HANKERS'BACKSWORD GIFTS ANKLUNGS RIDER PICA RECTA DREAMING@CORPULENCE.TACHOGRAMS BOLETUS STIRRING@CORPULENCE.TACHOGRAMS BLUNGER GIBUSES REPLETES WIVERNS.\nLITHARGE SLOTTERS ELUDE DIPODIES GABFESTS EXORCISM URCHIN SOLUTE UNEARTHS PRUNES, BOLETUS STRAFE GABFESTS. \"DREAMING\", \"STIRRING\". DREAMING'UPRISE ASPHALTS. STIRRING\nDREAMING STIRRING.\n\nLITHARGE SLOTTERS GAMB LODGED PICA BAWL TRANSACTORS ROUTINISTS: PIXELS.JUMBLER@CONNECTORS.TACHOGRAMS ANKLUNGS BANTENG COENZYME GIBUSES FLOCKS.\n\n\n```\n```\n$ cat plaintext.txt | obf -b blockedwords.txt \nThis is a sample file that holds some secrets. For example, both DREAMING and STIRRING are examples of a FRETS PEMMICAN.\nSimilarly you'd expect that their email addresses DREAMING@CORPULENCE.com and STIRRING@CORPULENCE.com should be considered secrets.\nThis line just confims behaviour with preceding or following punctuation, and EOL behaviour. \"DREAMING\", \"STIRRING\". DREAMING's house. STIRRING\nDREAMING STIRRING.\n\nThis line has another email address in it: PIXELS.JUMBLER@CONNECTORS.com that ought to be obfuscated.\n\n\n```\n```\n$ cat plaintext.txt | obf -b blockedwords.txt -n23\nThis is a sample file that holds some secrets. For example, both RETENE and GIBLETS are examples of a SACCHAROID CLEAVE.\nSimilarly you'd expect that their email addresses RETENE@TEMPERS.com and GIBLETS@TEMPERS.com should be considered secrets.\nThis line just confims behaviour with preceding or following punctuation, and EOL behaviour. \"RETENE\", \"GIBLETS\". RETENE's house. GIBLETS\nRETENE GIBLETS.\n\nThis line has another email address in it: UNREELS.CLEEKS@UPBEARS.com that ought to be obfuscated.\n\n\n```\n```\n$ cat plaintext.txt | obf -b blockedwords.txt -n23 -e bobandsue\nThis is a sample file that holds some secrets. For example, both RETENE and GIBLETS are examples of a SACCHAROID CLEAVE.\nSimilarly you'd expect that their email addresses RETENE@bobandsue.com and GIBLETS@bobandsue.com should be considered secrets.\nThis line just confims behaviour with preceding or following punctuation, and EOL behaviour. \"RETENE\", \"GIBLETS\". RETENE's house. GIBLETS\nRETENE GIBLETS.\n\nThis line has another email address in it: UNREELS.CLEEKS@UPBEARS.com that ought to be obfuscated.\n\n\n```\n```\n$ cat plaintext.txt | obf -b blockedwords.txt -n23 -e bobandsue -v -c\n{'blockedwords': ['secret', 'name', 'bob', 'sue'], 'hash_index': 23, 'hash_index_length': 4, \n'codewords_file': '/Users/hossein/anaconda3/lib/python3.6/site-packages/obf/codewords.txt', \n'codewords_hash': '25e011f81127ec5b07511850b3c153ce6939ff9b96bc889b2e66fb36782fbc0e', \n'excluded_domains': ['com', 'org', 'co', 'uk', 'bobandsue'], 'codewords_length': 66740}\nsecret -> SACCHAROID\nname -> CLEAVE\nbob -> RETENE\nsue -> GIBLETS\n```\n\n```\nobf -b blockedwords.txt -c -v -n23 --algo MD5 --salt examplesalt\n{'codewords_hash': '25e011f81127ec5b07511850b3c153ce6939ff9b96bc889b2e66fb36782fbc0e', 'salt': 'examplesalt',\n 'hash_index_length': 4, 'hash_algo': 'MD5', 'excluded_domains': ['com', 'org', 'co', 'uk'], 'hash_index': 12, \n 'codewords_file': '../obf/codewords.txt', 'blockedwords': ['secret', 'name', 'bob', 'sue'], \n 'codewords_length': 66740}\nsecret -> REVEALMENT\nname -> LOBATE\nbob -> ZOMBIS\nsue -> DEIL\n```\n\n**Homepage**\n------------\n\nYou can find the homepage of *obf* at https://github.com/hossg/obf\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hossg/obf", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "obf", "package_url": "https://pypi.org/project/obf/", "platform": "", "project_url": "https://pypi.org/project/obf/", "project_urls": { "Homepage": "https://github.com/hossg/obf" }, "release_url": "https://pypi.org/project/obf/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "an obfuscation tool and library", "version": "0.0.2" }, "last_serial": 4364025, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "a4b7d0604fce8673ef3186b645c25577", "sha256": "1bbb88f9c45e0ad514c3dacfadec34d1229557d7c5bb05de37f0051da0b01f23" }, "downloads": -1, "filename": "obf-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a4b7d0604fce8673ef3186b645c25577", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 191479, "upload_time": "2018-10-10T17:23:31", "url": "https://files.pythonhosted.org/packages/47/b7/a9f54ada10366a3ac4fdc234f4dc3f3b1b7fe0b6931f3546083df55f49cf/obf-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cb7f2ddc7942dcc8e5184a29a56ed3ff", "sha256": "cd62160672e33dc886c6dcaa08425f700eb9b5b89a3dc3ebdf739c0ef68cd642" }, "downloads": -1, "filename": "obf-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cb7f2ddc7942dcc8e5184a29a56ed3ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 193884, "upload_time": "2018-10-10T17:23:33", "url": "https://files.pythonhosted.org/packages/06/af/06f309739a4ec72ae47f1f8d93e2ff08574629600c02433c820c45ae1499/obf-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "d9dc17ca76b1a71d06cd80ca5d52e651", "sha256": "1e57c4017cabc96fad86208e2e3595f1856c843ee51e4e73bce90d8fdaadda46" }, "downloads": -1, "filename": "obf-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d9dc17ca76b1a71d06cd80ca5d52e651", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 204478, "upload_time": "2018-10-11T11:33:25", "url": "https://files.pythonhosted.org/packages/df/ce/cf14022a532a7a71d4085cdde289733f6f0ee77e55791f1327eb75f4a26f/obf-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ea1d47532c52be46e8c7a92f7b9ef50", "sha256": "1d6f0a6bc38e629917221ac4df46c9667d317a73da7717684d46414838bd8423" }, "downloads": -1, "filename": "obf-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1ea1d47532c52be46e8c7a92f7b9ef50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 191416, "upload_time": "2018-10-11T11:33:27", "url": "https://files.pythonhosted.org/packages/b5/d2/221f02ad6c09299c5ede89b32e1188e197d5912e378bfe63ec9307b775b4/obf-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d9dc17ca76b1a71d06cd80ca5d52e651", "sha256": "1e57c4017cabc96fad86208e2e3595f1856c843ee51e4e73bce90d8fdaadda46" }, "downloads": -1, "filename": "obf-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d9dc17ca76b1a71d06cd80ca5d52e651", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 204478, "upload_time": "2018-10-11T11:33:25", "url": "https://files.pythonhosted.org/packages/df/ce/cf14022a532a7a71d4085cdde289733f6f0ee77e55791f1327eb75f4a26f/obf-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ea1d47532c52be46e8c7a92f7b9ef50", "sha256": "1d6f0a6bc38e629917221ac4df46c9667d317a73da7717684d46414838bd8423" }, "downloads": -1, "filename": "obf-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1ea1d47532c52be46e8c7a92f7b9ef50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 191416, "upload_time": "2018-10-11T11:33:27", "url": "https://files.pythonhosted.org/packages/b5/d2/221f02ad6c09299c5ede89b32e1188e197d5912e378bfe63ec9307b775b4/obf-0.0.2.tar.gz" } ] }