{ "info": { "author": "Sufiyan Adhikari", "author_email": "dumbpyx@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# IITB LOGIN\n\nThis package consists a login script for headless login to `internet.iitb.ac.in` on any of the iitb servers. \nIt uses ssh key to encrypt your credentials safely for hastle-free login.\n\n## Install\n`pip install iitb-login` should install the script. \n\nWorks strictly on python 3.x versions. Does not support python 2.7 or older\n\nIf you are on older OS like ubuntu 16.04 or older and not using Anaconda3 installation already, It has default python to python 2.7, thus first install pip3 with `sudo apt install python3-pip` then this script with `pip3 install iitb-login`\n\n### Usage\n#### First time using ssh key\n```\n$ iitb login # to login. Enter username and password when prompted\n# Enter username: username\n# enter password: \n# Logged In As : username\n# Your IP: 10.119.xxx.xxx\n\n# Encrypting with key: /home/username/.ssh/\n# This Script uses your ssh key to encrypt credentials\n# Save credentials: [y/N]: y\n# Credentials written to file: ~/.ssh/iitb_login_creds and can only be \n# decrypted with your ssh key\n```\n\n#### Next time onwards\n```\n$ iitb login\n# Logged In as username\n# Your IP: 10.119.xxx.xxx\n```\n\n#### Other Options\n```\n$ iitb logout # to logout\n$ iitb status # to check status of login\n$ iitb # to check status of login (default argument is status)\n$ iitb reset # to delete the saved encrypted credentials\n```\n\n#### In case you use multiple ssh keys\nYou can select which key to use to encrypt the credentials. \n```\n$ iitb login\n# Enter username: username\n# Enter password\n# Logged In as username\n# Your IP: 10.119.xxx.xxx\n# Keys available:\n# [0] /home/username/.ssh/id_rsa\n# [1] .ssh/google/google_compute_engine\n# Select Key Index: 0\n# This Script uses your ssh key to encrypt credentials\n# Save credentials: [y/N]: y\n# Credentials written to file: ~/.ssh/iitb_login_creds and can only be \n# decrypted with your ssh key\n```\n\n\n### How It Works\n#### Scrapy Spider\n\nScrapy Spider is used to load `https://internet.iitb.ac.in`, parse the page, check passed argument parsed by `ArgumentParser` and filling the form for subsiquent `POST` request for login and logout. Methods `get_username(response)` is used to parse logged in user's username and `get_ip(response)` to parse machine's ip address.\n\n#### Paramiko\n`paramiko.Agent()` connects to exposed or forwarded `ssh-agent`'s api on the machine and use it's keys to sign a random string. The signature of the string changes with each ssh key. Hence, credentials encrypted with one key can only be decrypted by the same key. \nThese encrypted keys can now be saved in a pickle file at `~/.ssh/iitb_login_creds` without the risk of exposing the credentials.\n\nThe keys from `paramiko.Agent().get_keys()` have a `sign_ssh_data()` method that is used to get the symetric key used for encryptng the credentials. As the signature returned is dependent of the private key being used for signing, the credentials are safe in a pickle dump and only be decrypted using the same key.\n\n### Version History\n`v 0.1.2` First release. wrong ip address parsing \n`v 0.1.3` ip parsing patched \n`v 0.1.4` Allows choosing ssh key in case of multiple keys \n`v 0.2.1` First Stable Release. README updated, setup.py url fixed.\n\n## Future Changes\nIn case the script becomes outdated and needs an update, feel free to make a pull request, or create an issue on github.", "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/dumbPy/iitb-login", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "iitb-login", "package_url": "https://pypi.org/project/iitb-login/", "platform": "", "project_url": "https://pypi.org/project/iitb-login/", "project_urls": { "Homepage": "https://github.com/dumbPy/iitb-login" }, "release_url": "https://pypi.org/project/iitb-login/0.2.1/", "requires_dist": null, "requires_python": ">=3.3.*", "summary": "iitb login script with ssh key based credentials encryption", "version": "0.2.1" }, "last_serial": 5153634, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "1992409bc4a8cf1766f36ea295620f40", "sha256": "ffa35233fcabd35e9e9cdb5522b5f7491d23c938e2ed89a4947258cd375978d2" }, "downloads": -1, "filename": "iitb-login-0.1.3.tar.gz", "has_sig": false, "md5_digest": "1992409bc4a8cf1766f36ea295620f40", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3", "size": 4138, "upload_time": "2019-04-02T15:57:37", "url": "https://files.pythonhosted.org/packages/f5/03/92d1957320e4c199f1ad07993436d7d6c67955567f6a9dbc28d2ea8a8dc4/iitb-login-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "4ab1ba636830aa92e4b394e21f9f0102", "sha256": "61d13ac3f164c458cc116f92acb8428fc37a4fe6361d5ef546d9b82c5d431817" }, "downloads": -1, "filename": "iitb-login-0.1.4.tar.gz", "has_sig": false, "md5_digest": "4ab1ba636830aa92e4b394e21f9f0102", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3", "size": 4814, "upload_time": "2019-04-15T08:49:36", "url": "https://files.pythonhosted.org/packages/18/3b/5517008181c92d779c0eadb5fd6bb528c7eacdcc4233bf68f2e86b18806d/iitb-login-0.1.4.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ec857522e68aa3ea26f8ecda284b20e9", "sha256": "0f3e110bf1b05c29965d535106dd9060203f40606f868b7aee76eff921bad5ac" }, "downloads": -1, "filename": "iitb-login-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ec857522e68aa3ea26f8ecda284b20e9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3.*", "size": 5515, "upload_time": "2019-04-17T07:18:54", "url": "https://files.pythonhosted.org/packages/63/5a/6ba6bafea117810f383b6a5cef501b8447a9ef95d27d352153c6acedab85/iitb-login-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ec857522e68aa3ea26f8ecda284b20e9", "sha256": "0f3e110bf1b05c29965d535106dd9060203f40606f868b7aee76eff921bad5ac" }, "downloads": -1, "filename": "iitb-login-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ec857522e68aa3ea26f8ecda284b20e9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3.*", "size": 5515, "upload_time": "2019-04-17T07:18:54", "url": "https://files.pythonhosted.org/packages/63/5a/6ba6bafea117810f383b6a5cef501b8447a9ef95d27d352153c6acedab85/iitb-login-0.2.1.tar.gz" } ] }