{ "info": { "author": "Thomas Touhey", "author_email": "thomas@touhey.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Topic :: Internet :: Finger", "Topic :: Utilities" ], "description": "finger (RFC 1288) server-side daemon\n====================================\n\nfinger is both a protocol and a utility to get the information and status\nfrom a user on a distant machine. It was standardized in `RFC 742`_\nin 1977, then in `RFC 1288`_ in 1991, and has been abandoned since.\n\nWhile describing the protocol in `a blog post of mine`_, I wanted\nto implement this protocol for fun, but didn't want to present the\nreal information about the users on my server, so I made this to present some\nfictional information in order to be able to tell a story through finger.\n\nThe finger server should be available through the TCP port 79, which can only\nbe opened by ``root`` on UNIX-like machines. Instead of using this port\ndirectly, which forces the use of the ``root`` user to manage the service,\nyou can redirect the incoming transmissions from an interface on TCP port 79\nto another TCP port which you can open as a user (port number over 1024)\nby appending a rule in ``iptables``:\n\n.. code-block:: sh\n\n\tiptables -t nat -A OUTPUT -p tcp [-s ] [-d ] \\\n\t\t--dport 79 -j DNAT --to \n\nWhere ```` is the source IP address or network that are redirected,\n```` is the destination IP address or network for which the\nrequests are redirected and ```` is the IP and port\nyou want to forward the packets to, e.g. ``127.0.0.1:4000``.\n\nThe basic configuration of the server is stored in the ``actions.ini`` file,\nsee the comments for how to make it do what you want it to do. Other\nconfiguration files are described in their specific sections.\n\nTo run the application, use the following command:\n\n.. code-block:: sh\n\n\tpython3 -m fingerd \n\nActions timeline\n----------------\n\nThe actions are stored as a TOML document. Each action is stored under its\ntime offset, using an array section, where the time offset is represented\nthis way:\n\n\t-?(w)?([jd])?(h)?(m)?(s)?\n\nWhere negative times, starting with a dash (``-``), are the initial situation,\nwhat is supposed to have happened before the beginning.\n\nFor example, ``-1w5d2h`` means \u201c1 week, 5 days and 2 hours before the\norigin\u201d and ``2j`` means \u201c2 days after the origin\u201d. So if we want to make\nan action that takes place 5 seconds after the origin, the first line of the\naction will be the following one:\n\n.. code-block::\n\n\t[[5s]]\n\nAll actions have a type represented by the ``type`` property, and other\nproperties depending on the type. Types and related properties are\ndescribed in the sections below.\n\nFlow-related actions\n~~~~~~~~~~~~~~~~~~~~\n\nThe following are related to the action flow:\n\n``loop``\n\tThe actions restart from the beginning.\n\n``interrupt``\n\tThe server freezes on the latest situation.\n\n``stop``\n\tThe server stops on the event.\n\nAll the actions after the time of any of these will be ignored.\n\nUser-related actions\n~~~~~~~~~~~~~~~~~~~~\n\nUser-related actions' types can be of the following:\n\n``create``\n\tA user has been created.\n\n``update``\n\tA user's information has been updated.\n\n``delete``\n\tA user has been deleted.\n\n``login``\n\tA user has logged in and is active.\n\n``cd``\n\tA user has changed their working directory.\n\n``idle``\n\tA user is now idle (not typing on the keyboard anymore.\n\n``active``\n\tA user is now active (typing every now and then).\n\n``logout``\n\tA user has logged out.\n\nAs all of these actions are about users, they all take an additional\n``login`` argument which is the affected user's name, e.g. ``rinehart``.\n\nThe ``create`` and ``update`` events takes some more arguments\n(\u201cman.\u201d means mandatory):\n\n``name``\n\tThe user full name, e.g. \u201cMark J. Rinehart\u201d.\n\n``shell``\n\tThe selected login shell.\n\n``home``\n\tThe home directory.\n\nThe ``login`` operation takes the information about the originating shell:\n\n``office``\n\tThe office name, e.g. \u201cMark's office\u201d.\n\nThe ``cd`` operation takes the information about the directory to which the\nshell changes:\n\n``dir``\n\tThe absolute path of the new directory, e.g. \u201c/var/www\u201d.\n\nWhat is left to do\n------------------\n\n- separate users and sessions, so that there can be several sessions\n displayed as in these examples:\n\n .. code-block::\n\n Login Name Tty Idle Login Time Office Office Phone\n cake Thomas Touhey pts/0 Sep 12 22:51 (XXXX::XXXX)\n cake Thomas Touhey pts/1 Sep 12 22:51 (XXXX::XXXX)\n\n .. code-block::\n\n Login: cake \t\t\t Name: Thomas Touhey\n Directory: /home/cake \tShell: /bin/zsh\n On since Wed Sep 12 22:51 (CEST) on pts/0 from XXXX::XXXX\n 8 seconds idle\n On since Wed Sep 12 22:51 (CEST) on pts/1 from XXXX::XXXX\n 4 seconds idle\n No Plan.\n\n.. _RFC 742: https://tools.ietf.org/html/rfc742\n.. _RFC 1288: https://tools.ietf.org/html/rfc1288\n.. _a blog post of mine: #actually-it-is-still-a-work-in-progress", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://forge.touhey.fr/fingerd.git/", "keywords": "finger,fingerd,rfc742,rfc1288,79,tcp/79", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fingerd", "package_url": "https://pypi.org/project/fingerd/", "platform": "", "project_url": "https://pypi.org/project/fingerd/", "project_urls": { "Homepage": "https://forge.touhey.fr/fingerd.git/" }, "release_url": "https://pypi.org/project/fingerd/0.1/", "requires_dist": null, "requires_python": "", "summary": "finger (RFC 1288) server-side daemon.", "version": "0.1" }, "last_serial": 4266476, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d0b0bab8667479537d8635689ca64b88", "sha256": "980b242ce53613c6fb56db62885b16f3cc66958db50e81f7a87ba8ee7781bb9a" }, "downloads": -1, "filename": "fingerd-0.1.tar.gz", "has_sig": false, "md5_digest": "d0b0bab8667479537d8635689ca64b88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16103, "upload_time": "2018-09-12T20:58:34", "url": "https://files.pythonhosted.org/packages/96/64/27944a3496631175a7c5b7a08daede823ed415daebe1101877a16e166396/fingerd-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d0b0bab8667479537d8635689ca64b88", "sha256": "980b242ce53613c6fb56db62885b16f3cc66958db50e81f7a87ba8ee7781bb9a" }, "downloads": -1, "filename": "fingerd-0.1.tar.gz", "has_sig": false, "md5_digest": "d0b0bab8667479537d8635689ca64b88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16103, "upload_time": "2018-09-12T20:58:34", "url": "https://files.pythonhosted.org/packages/96/64/27944a3496631175a7c5b7a08daede823ed415daebe1101877a16e166396/fingerd-0.1.tar.gz" } ] }