{ "info": { "author": "Sh3llcod3", "author_email": "no-reply@gmail.co.uk", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Topic :: Security :: Cryptography" ], "description": "# Memecrypt\n\nMemecrypt is an encryption tool designed for recreational use,\nwith the purpose of encrypting and sending messages and memes\nbetween your friends. It features a substitution cipher, designed\nand made completely from scratch, where text can be encrypted and\ndecrypted with the same key from a variety of input sources.\n\nMemecrypt can be imported as a python module or used as a standalone\nprogram, depending on which is required.\n\n![GitHub forks](https://img.shields.io/github/forks/Sh3llcod3/Memecrypt.svg?style=for-the-badge&label=Fork)\n![GitHub stars](https://img.shields.io/github/stars/Sh3llcod3/Memecrypt.svg?style=for-the-badge&label=Stars)\n![GitHub watchers](https://img.shields.io/github/watchers/Sh3llcod3/Memecrypt.svg?style=for-the-badge&label=Watch)\n\n# Prerequisites\n\n- A GNU/Linux based OS (Tested on: Ubuntu 18.04/Kali 2019.1)\n- Bash\n- Git\n- Python3 (pip3, requests)\n\n# Usage\n\nThere are 2 main ways to use memecrypt. Both the program\nand module usage is covered here.\n\n## Program usage\n\nTo use this as a program, start by cloning the repository from GitHub.\nThen build the PyPi format package and install it.\n\n```shell\n$ git clone https://github.com/Sh3llcod3/Memecrypt.git\n$ cd Memecrypt\n$ python3 -m pip install --user --upgrade setuptools wheel\n$ python3 setup.py sdist bdist_wheel\n$ cd dist/ && python3 -m pip install *.whl --user && cd .. && rm build/ dist/ memecrypt.egg-info/ -rf\n```\n\nAlternatively, you may install it direct from PyPi, ready for use.\n\n```shell\n$ python3 -m pip install memecrypt\n```\n\n#### Options\n\nLet's start by viewing all the supported arguments.\n\n```shell\n$ memecrypt --help\n[+] Usage: memecrypt [options]\n\n[i] Examples:\n\n memecrypt -se -i foo -k bar\n\n memecrypt --subs -x -f file.txt -k \"super secret\"\n\n memecrypt -sx -c Ciphertext -k key\n\n memecrypt --subs -e -u cat.thatlinuxbox.com -k lolcat\n\n[i] Positional arguments:\n\n -s --subs\n Select the substitution cipher.\n -e --encrypt\n Select encryption mode.\n -x --decrypt\n Select decryption mode.\n -k --key key\n Specify the key to use.\n -i --input input-string\n Specify a string to encrypt/decrypt.\n -u --url url\n Fetch the plaintext/ciphertext from the url.\n -f --file file-path\n Use local file for encrypting/decrypting.\n\n[i] Optional arguments:\n\n -h --help\n Show this help screen and exit.\n -v --version\n Print version information and exit.\n -q --quiet\n Only show output. Any errors are still displayed.\n -o --output-file file\n Specify a file to output to.\n```\n\n#### Encryption\n\nEncrypt a message, taking input as an; argument, url\nor file, respectively. In each example, different\nrepresentations of arguments may have been used or more\noptions may have been added to display potential permutations.\n\n```shell\n\n# As an argument\n$ ./memecrypt.py -se -i \"foo bar\" -k \"lorem ipsum\"\n[!] Note: Please use the same key for decryption.\n[+] Encrypted result:\n---------------------\nMHFGL1AjdjpSXXx8\n\n# From a URL\n$ ./memecrypt.py --subs --encrypt --url cat.thatlinuxbox.com --key \"cat\"\n[+] Fetched data from URL.\n[!] Note: Please use the same key for decryption.\n[+] Encrypted result:\n---------------------\nWiJeTFoiXkxaOl5ETDpeREw6XkRMOl5ET.....(and so on).....\n\n# From a local file\n$ ./memecrypt.py -se -f -k \"foobar\" -q\nNWl8eSlMd35ZXTQxU289Y0ZdNGdGTCdrU2FBQ3pM...(and so on)...\n\n```\n\n#### Decryption\n\nDecrypt a message, again using argument, and local file\nrespectively. An URL can also be used here, but I didn't\nhave the time to host a memecrypt encrypted text page.\n\n```shell\n\n# Decrypt as an argument.\n./memecrypt.py -sx -i bVQ0cjJfVkY1TGNCKFRWWzIkZVF... -k wow\n[+] Decrypted result:\n---------------------\nMuch encryption, very wow\n\n# Decrypt from file\n$ ./memecrypt.py --subs --decrypt -f ../../projects/outputfile -k lol\n[+] Decrypted result:\n---------------------\nCupcake ipsum dolor. Sit amet topping chocolate bar\n\n```\n\n#### Notes\n\n**Arguments can be used in any order, any form and\narguments can be combined, as long as they don't need\na passed value.** A bit like how you would use `ls -al`.\n\nThere are more options and ways you can use them.\nPlease see the help screen for info on the options.\n\nThis is just my implementation of memecrypt and you are welcome\nto create your own, or improve upon the algorithm.\n\nTo create this, I used [Easyparse](https://github.com/Sh3llcod3/Easyparse),\nwhich is a user-friendly, lightweight argument parser that I wrote.\n\n\n## Module usage\n\nTo use Memecrypt as a python3 module, we'll need to install this\nfrom PyPi using [pip3](https://pip.pypa.io/en/stable/).\nSimply run `python3 -m pip install memecrypt` to install the\nmodule.\n\n#### Initialising\n\nLet's start by creating an instance of the `meme_cipher` class.\n\n```Python\n# Import our module\nimport memecrypt\n\n# Create an instance\ncipher = memecrypt.meme_cipher(message=None, enc_key=None, show_colors=True)\n\n# message is the message to work on\n# enc_key is the key\n# show_colors=False to turn off all colors\n\n# message, enc_key, show_colors are optional.\n# You could simply just do:\ncipher = memecrypt.meme_cipher()\n\n```\n\n#### Setting a message\n\nOnce you have created an instance of the `meme_cipher` class,\nyou can set the message at any time, by calling\nthe method shown below. The message cannot be blank or `None`.\nYou don't have to use this method for setting the message,\nyou can simply set the `.message` attribute too.\nThe method is there for simplicity reasons.\n\n```Python\n# Using our previous instance\ncipher.set_message(\"foo\")\n\n# We can access/modify this by accessing the message attribute\nprint(cipher.message)\n# Prints: foo\n\n# Let's try and set a blank message.\ncipher.set_message(None)\n# Prints: [!] Memecrypt: Plaintext/Ciphertext cannot be empty.\n\n```\n\n#### Setting a key\n\nThis works the same way as setting a message. As usual, we'll use\nour `cipher` instance. Again, the key cannot be blank or `None`.\nSimilar to before, you can set the key by modifying the `enc_key` attribute.\n\n```Python\n# Setting a key\ncipher.set_key(\"bar\")\n\n# We can access/modify the key from the enc_key attribute\nprint(cipher.enc_key)\n# Prints: bar\n\n# Same as before, we can't set a blank key\ncipher.set_key('')\n# Prints: [!] Memecrypt: Key value cannot be empty.\n\n```\n\n#### Encrypting\n\nOnce we have set a key and a message, we can encrypt them.\nThis will return the result. If the key or message is missing,\nit will display an error.\n\n```Python\n# message => foo, key => bar\ncipher.encrypt()\n# Returns: 'NEgydQ=='\n\n```\n\n#### Decrypting\n\nDecrypting is a similar process to encrypting. A valid non-empty\nkey and message is needed, and errors are displayed if any are not\npresent.\n\n```Python\n# message => NEgydQ==, key=> bar\ncipher.decrypt()\n# Returns: 'foo'\n\n```\n\n#### Input sources\n\nIf we wanted, we could also get our message/key text from a local file\nor an URL. You don't have to use this of course, you could implement your\nown file handing using `with` blocks or get the contents from a url using\nrequests, urllib3, aiohttp or any module you want. It's simply there for\nconvenience purposes, but chances are you can do it better.\n\n```Python\n# transfer the contents of the url.\ncat = cipher.fetch_url(\"cat.thatlinuxbox.com\")\n# Returns a ascii cat.\ncipher.set_message(cat)\n# We just set our message as the ascii cat!\n\n# Read a local file.\nfoo_file = cipher.read_file(\"/path/to/file/file.txt\")\n# foo_file will have contents of file.txt\n\n# Set our message to contents of file.txt\ncipher.set_message(foo_file)\n\n```\n\n#### Output files\n\nIf you want to write the output to a file, you can simply do:\n\n```Python\n# Append to a file. Create file if file non-existent.\ncipher.write_to(\"path/to/file/file.txt\", \"lorem ipsum dolor\")\n\n# Let's put our encrypted output to a file.\ncipher.write_to(\"foo_bar.txt\", cipher.encrypt())\n```\n\nLike the input sources, you could write your own method of writing to\na file.\n\n# Conclusion\n\nI would like to thank you for taking the time to read this.\nI hope it has been useful in explaining Memecrypt and how it\ncan be used as a module or program. If you have any questions,\nplease create an issue in GitHub, and I will try my best to respond\nto it, as long as its related to memecrypt and its use.\n\nMemecrypt is just one of my 'weekend projects'.\nYou can view my other projects at my GitHub page,\nwhere I have built a Wireless network auditing\nscript called [Airscript-ng](https://github.com/Sh3llcod3/Airscript-ng) with quite a few built-in tools,\nand [Easyparse](https://github.com/sh3llcod3/Easyparse) a lightweight, user-friendly argument parser.\n\n[GitHub Link](https://github.com/Sh3llcod3/Memecrypt)\n\n# To-do\n\n- [ ] Add support for binary files\n- [ ] Add other modes of operation (in progress)\n\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/Sh3llcod3/Memecrypt", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "memecrypt", "package_url": "https://pypi.org/project/memecrypt/", "platform": "", "project_url": "https://pypi.org/project/memecrypt/", "project_urls": { "Homepage": "https://github.com/Sh3llcod3/Memecrypt" }, "release_url": "https://pypi.org/project/memecrypt/1.3/", "requires_dist": [ "easyparse" ], "requires_python": ">=3", "summary": "An encryption tool, designed for recreational purposes.", "version": "1.3" }, "last_serial": 4691389, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "9fbafe32616f62079737eeb160065fc4", "sha256": "a485ba169ff3ded074c4ec1a26d9b8ec513912f0fb11a8db76bb83713d41de5f" }, "downloads": -1, "filename": "memecrypt-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9fbafe32616f62079737eeb160065fc4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 11943, "upload_time": "2018-07-30T22:57:32", "url": "https://files.pythonhosted.org/packages/0d/7d/4c6b044a6fe8c4676ca62053d525cc2518a53ad3121aae85d1d43bd06e94/memecrypt-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ddae67f063ed2c7ef4fd67945250666", "sha256": "dec77d644e4bccc685d60d62ff4d5cd4d7fb388dc9e0480b2d7cf125823caede" }, "downloads": -1, "filename": "memecrypt-1.0.tar.gz", "has_sig": false, "md5_digest": "7ddae67f063ed2c7ef4fd67945250666", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13096, "upload_time": "2018-07-30T22:57:33", "url": "https://files.pythonhosted.org/packages/7e/86/75b55ea4ec336a7bf649e62f06a4118cccb91fce2ab886a29d53dac01474/memecrypt-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "231ea5ad7b74bea72988b245e78e32c4", "sha256": "e917092a67e0bd131b5af60a03960199df1f9a5691fdf6c9b2b2b18219404ef6" }, "downloads": -1, "filename": "memecrypt-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "231ea5ad7b74bea72988b245e78e32c4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 24518, "upload_time": "2019-01-12T14:33:17", "url": "https://files.pythonhosted.org/packages/74/f5/308b9b8656616b7108df94e658cc463d26ec84f8d8dfd59c3093360fd934/memecrypt-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c175011e6e7732fbe1bdc2d16a6352d", "sha256": "a177c605d10af5ebcebfa1730ec4d2d2baf1e96dbfe9b8cc4387475abb74d799" }, "downloads": -1, "filename": "memecrypt-1.1.tar.gz", "has_sig": false, "md5_digest": "7c175011e6e7732fbe1bdc2d16a6352d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13432, "upload_time": "2019-01-12T14:33:18", "url": "https://files.pythonhosted.org/packages/38/4b/a0b9685c5a220ddfaf9cf58e9564da0cccda710a6743ea79216c144da8c3/memecrypt-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "0a7efd3ddbae56ddc73deff4c9d5d7a1", "sha256": "9d34aad7ab9bfe8708aa3a1b278af045965966cb3573246b61544895edcabf3e" }, "downloads": -1, "filename": "memecrypt-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0a7efd3ddbae56ddc73deff4c9d5d7a1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 24519, "upload_time": "2019-01-12T14:48:10", "url": "https://files.pythonhosted.org/packages/ef/18/5d18fa22e4c99f036a6166002cf48b615015c0a05fadca94ac0c754e307c/memecrypt-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a4df09fb507b6a6dcc72ab11f49ef62", "sha256": "f26dd51dad56b6c8498b5c68d6916e551c89c121f0c8a4842708b5d308160b81" }, "downloads": -1, "filename": "memecrypt-1.2.tar.gz", "has_sig": false, "md5_digest": "3a4df09fb507b6a6dcc72ab11f49ef62", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13430, "upload_time": "2019-01-12T14:48:12", "url": "https://files.pythonhosted.org/packages/39/5c/9c2e92a9b14bc7e51d4a48babc4fc7de7ee4072ce164a71c94419d55485b/memecrypt-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "a9569bb2a1e6101dc8dbc9d65dbd6e49", "sha256": "8b32ad32783e023ce0db1f7359445927cd3fa617702568f4629f2904fb956e95" }, "downloads": -1, "filename": "memecrypt-1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a9569bb2a1e6101dc8dbc9d65dbd6e49", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 24601, "upload_time": "2019-01-13T17:54:40", "url": "https://files.pythonhosted.org/packages/97/f5/22d233411dda3d8283a46e74d9f31d7a288db7f4df4915df02bb1bc57ada/memecrypt-1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0881e89b53346fb97b14fecba4d8a339", "sha256": "281128845e6896070708db1d980428537713e89b153268424ead5ce2325839dd" }, "downloads": -1, "filename": "memecrypt-1.3.tar.gz", "has_sig": false, "md5_digest": "0881e89b53346fb97b14fecba4d8a339", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13514, "upload_time": "2019-01-13T17:54:42", "url": "https://files.pythonhosted.org/packages/00/64/8ff649dc82cf8b54dfb3dd66a4734ec71f2e3e1a09afc0f1a369dd769a3b/memecrypt-1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a9569bb2a1e6101dc8dbc9d65dbd6e49", "sha256": "8b32ad32783e023ce0db1f7359445927cd3fa617702568f4629f2904fb956e95" }, "downloads": -1, "filename": "memecrypt-1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a9569bb2a1e6101dc8dbc9d65dbd6e49", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 24601, "upload_time": "2019-01-13T17:54:40", "url": "https://files.pythonhosted.org/packages/97/f5/22d233411dda3d8283a46e74d9f31d7a288db7f4df4915df02bb1bc57ada/memecrypt-1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0881e89b53346fb97b14fecba4d8a339", "sha256": "281128845e6896070708db1d980428537713e89b153268424ead5ce2325839dd" }, "downloads": -1, "filename": "memecrypt-1.3.tar.gz", "has_sig": false, "md5_digest": "0881e89b53346fb97b14fecba4d8a339", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13514, "upload_time": "2019-01-13T17:54:42", "url": "https://files.pythonhosted.org/packages/00/64/8ff649dc82cf8b54dfb3dd66a4734ec71f2e3e1a09afc0f1a369dd769a3b/memecrypt-1.3.tar.gz" } ] }