{ "info": { "author": "Wilson Sumanang, Alexandre ZANNI", "author_email": "", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Other Audience", "License :: Other/Proprietary License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Security", "Topic :: Utilities" ], "description": "# Flask Session Cookie Decoder/Encoder\n\nOriginal author : [**Wilson Sumanang**](https://github.com/saruberoz)\n\nFixes and improvements author : [**Alexandre ZANNI**](https://github.com/noraj)\n\nImported from [saruberoz.github.io](http://saruberoz.github.io/flask-session-cookie-decoder-slash-encoder)\n\n## Depencencies\n\n+ Python 2 or Python 3\n+ [itsdangerous](https://pypi.python.org/pypi/itsdangerous)\n+ [Flask](https://pypi.python.org/pypi/Flask)\n\n## Installation\n\n### ArchLinux\n\n#### Python 3\n\n```\n# pacman -S python\n# pacman -S python-itsdangerous python-flask --asdep\n```\n\n#### Python 2\n\n```\n# pacman -S python2\n# pacman -S python2-itsdangerous python2-flask --asdep\n```\n\n### Other distros\n\nFind your way with your package manager, use pip in a virtual environment or use [pyenv](https://github.com/pyenv/pyenv).\n\n## Usage\n\nUse `flask_session_cookie_manager3.py` with Python 3 and `flask_session_cookie_manager2.py` with Python 2.\n\n```\nusage: flask_session_cookie_manager{2,3}.py [-h] {encode,decode} ...\n\nFlask Session Cookie Decoder/Encoder\n\npositional arguments:\n {encode,decode} sub-command help\n encode encode\n decode decode\n\noptional arguments:\n -h, --help show this help message and exit\n```\n\n### Encode\n\n```\nusage: flask_session_cookie_manager{2,3}.py encode [-h] -s -t \n\noptional arguments:\n -h, --help show this help message and exit\n -s , --secret-key \n Secret key\n -t , --cookie-structure \n Session cookie structure\n```\n\n### Decode\n\n```\nusage: flask_session_cookie_manager.py decode [-h] [-s ] -c \n\noptional arguments:\n -h, --help show this help message and exit\n -s , --secret-key \n Secret key\n -c , --cookie-value \n Session cookie value\n```\n\n## Examples\n\n### Encode\n\n```\n$ python{2,3} flask_session_cookie_manager{2,3}.py encode -s '.{y]tR&sp&77RdO~u3@XAh#TalD@Oh~yOF_51H(QV};K|ghT^d' -t '{\"number\":\"326410031505\",\"username\":\"admin\"}'\neyJudW1iZXIiOnsiIGIiOiJNekkyTkRFd01ETXhOVEExIn0sInVzZXJuYW1lIjp7IiBiIjoiWVdSdGFXND0ifX0.DE2iRA.ig5KSlnmsDH4uhDpmsFRPupB5Vw\n```\n\n**Note**: the session cookie structure must be a valid python dictionary\n\n### Decode\n\nWith secret key:\n\n```\n$ python{2,3} flask_session_cookie_manager{2,3}.py decode -c 'eyJudW1iZXIiOnsiIGIiOiJNekkyTkRFd01ETXhOVEExIn0sInVzZXJuYW1lIjp7IiBiIjoiWVdSdGFXND0ifX0.DE2iRA.ig5KSlnmsDH4uhDpmsFRPupB5Vw' -s '.{y]tR&sp&77RdO~u3@XAh#TalD@Oh~yOF_51H(QV};K|ghT^d'\n{u'username': 'admin', u'number': '326410031505'}\n```\n\n\nWithout secret key (less pretty output):\n\n```\n$ python{2,3} flask_session_cookie_manager{2,3}.py decode -c 'eyJudW1iZXIiOnsiIGIiOiJNekkyTkRFd01ETXhOVEExIn0sInVzZXJuYW1lIjp7IiBiIjoiWVdSdGFXND0ifX0.DE2iRA.ig5KSlnmsDH4uhDpmsFRPupB5Vw'\n{\"number\":{\" b\":\"MzI2NDEwMDMxNTA1\"},\"username\":{\" b\":\"YWRtaW4=\"}}\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/noraj/flask-session-cookie-manager", "keywords": "Flask session cookie", "license": "Unknown License", "maintainer": "Alexandre ZANNI, TAbdiukov", "maintainer_email": "", "name": "flask-session-cookie-manager", "package_url": "https://pypi.org/project/flask-session-cookie-manager/", "platform": "", "project_url": "https://pypi.org/project/flask-session-cookie-manager/", "project_urls": { "Homepage": "https://github.com/noraj/flask-session-cookie-manager" }, "release_url": "https://pypi.org/project/flask-session-cookie-manager/1.2.1.1/", "requires_dist": null, "requires_python": "", "summary": "simple Python script to deal with Flask session cookie", "version": "1.2.1.1" }, "last_serial": 5279609, "releases": { "1.2.1": [ { "comment_text": "", "digests": { "md5": "38ea99487f69cb82a17a1a2054758523", "sha256": "b106c91557db4325d54dbc6da715a61cd23411a52f7a0d27f9dac2009b4c795a" }, "downloads": -1, "filename": "flask-session-cookie-manager-1.2.1.tar.gz", "has_sig": false, "md5_digest": "38ea99487f69cb82a17a1a2054758523", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3571, "upload_time": "2019-05-16T22:24:12", "url": "https://files.pythonhosted.org/packages/00/6a/c7ba2c5523db50649c49bd51829fda807c9748d0e517dba5542c01bcbd75/flask-session-cookie-manager-1.2.1.tar.gz" } ], "1.2.1.1": [ { "comment_text": "", "digests": { "md5": "441f647cd191a5e7574edcb1f51a3eeb", "sha256": "0f31cb6d0c91bdd1f5db33d83e3b06faa4314c4a5455ac8b1538ce7f96248c5b" }, "downloads": -1, "filename": "flask-session-cookie-manager-1.2.1.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "441f647cd191a5e7574edcb1f51a3eeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5592, "upload_time": "2019-05-16T22:40:07", "url": "https://files.pythonhosted.org/packages/54/6d/f3fd7413b2fb6a6b0d0783de7402f9cd1da1f3abc6fffc574050157d4642/flask-session-cookie-manager-1.2.1.1.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "3415cc46d98d84b4fdc158583e8fea2a", "sha256": "85564b9c7190157c8da7ddf74402e74525df9ba9fe8a810ba8b92b4b3a6f14c8" }, "downloads": -1, "filename": "flask_session_cookie_manager-1.2.1.1-py3.7.egg", "has_sig": false, "md5_digest": "3415cc46d98d84b4fdc158583e8fea2a", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 8728, "upload_time": "2019-05-16T22:40:09", "url": "https://files.pythonhosted.org/packages/38/d1/ddccab88ce547589b9118a706b21a7d0d722ea0d804aa1198b1a5951fc8b/flask_session_cookie_manager-1.2.1.1-py3.7.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "441f647cd191a5e7574edcb1f51a3eeb", "sha256": "0f31cb6d0c91bdd1f5db33d83e3b06faa4314c4a5455ac8b1538ce7f96248c5b" }, "downloads": -1, "filename": "flask-session-cookie-manager-1.2.1.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "441f647cd191a5e7574edcb1f51a3eeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5592, "upload_time": "2019-05-16T22:40:07", "url": "https://files.pythonhosted.org/packages/54/6d/f3fd7413b2fb6a6b0d0783de7402f9cd1da1f3abc6fffc574050157d4642/flask-session-cookie-manager-1.2.1.1.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "3415cc46d98d84b4fdc158583e8fea2a", "sha256": "85564b9c7190157c8da7ddf74402e74525df9ba9fe8a810ba8b92b4b3a6f14c8" }, "downloads": -1, "filename": "flask_session_cookie_manager-1.2.1.1-py3.7.egg", "has_sig": false, "md5_digest": "3415cc46d98d84b4fdc158583e8fea2a", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 8728, "upload_time": "2019-05-16T22:40:09", "url": "https://files.pythonhosted.org/packages/38/d1/ddccab88ce547589b9118a706b21a7d0d722ea0d804aa1198b1a5951fc8b/flask_session_cookie_manager-1.2.1.1-py3.7.egg" } ] }