{ "info": { "author": "Evan Foster", "author_email": "evan@fos.tech", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3.7", "Topic :: System :: Networking :: Monitoring" ], "description": "## remotecap\n\nA small utility to perform tcpdump packet captures remotely and stream the results back via SSH. It supports capturing from multiple machines at once using asyncio. Additionally, it displays the capture file sizes and growth rates so you know how much data you're getting.\n\n### Installation\nremotecap requires Python >= 3.7. remotecap has these hard dependencies: \n\n* [`aiofiles`](https://github.com/Tinche/aiofiles)\n* [`asyncssh`](https://github.com/ronf/asyncssh)\n* [`asciimatics`](https://github.com/peterbrittain/asciimatics)\n* [`bcrypt`](https://github.com/pyca/bcrypt/) enables SSH private keys (**strongly recommended**)\n* [`libnacl`](https://github.com/saltstack/libnacl) to support more cryptographic options\n * `libnacl` requires [`libsodium`](https://github.com/jedisct1/libsodium) which you should install via your distro's package manager\n* [`gssapi`](https://github.com/pythongssapi/python-gssapi)\n* [`pyOpenSSL`](https://github.com/pyca/pyopenssl)\n\n\nTo install all hard and development dependencies, run this command:\n\n```bash\npip install 'remotecap[dev]'\n```\n\nI would strongly recommend that you do this in a `virtualenv`.\n\nFrom there, you should be able to just run `remotecap`\n\n### Usage\n```text\nusage: remotecap [-h] -w FILENAME [-f FILTER] [-k KEY] [-i INTERFACE] [-p]\n [-s PACKET_LENGTH] [-u USER] [-r REFRESH_INTERVAL]\n [-n KNOWN_HOSTS] [-e] [-c COMMAND_PATH] [-q] [-d]\n hosts [hosts ...]\n\npositional arguments:\n hosts Hosts to perform the capture on. Required.\n\noptional arguments:\n -h, --help show this help message and exit\n -w FILENAME, --filename FILENAME\n File to write to if performing the capture on a single\n host. Folder to put captures in if capturing from\n multiple hosts. Required. (default: None)\n -f FILTER, --filter FILTER\n Filter to pass to tcpdump on the remote host(s).\n (default: not port 22)\n -k KEY, --key KEY Location of SSH private keys to use. Can be specified\n multiple times. (default: None)\n -i INTERFACE, --interface INTERFACE\n Interface to perform the capture with on the remote\n host(s). (default: any)\n -p, --password-prompt\n Prompt for password to use for SSH. SSH keys are\n recommended instead. (default: False)\n -s PACKET_LENGTH, --packet-length PACKET_LENGTH\n Length of packets to capture. (default: 0)\n -u USER, --user USER User to SSH as. The user must have sufficient rights.\n (default: root)\n -r REFRESH_INTERVAL, --refresh-interval REFRESH_INTERVAL\n Interval to refresh file size and growth rates at.\n (default: 5)\n -n KNOWN_HOSTS, --known-hosts KNOWN_HOSTS\n Known hosts file to use. Specify \"None\" if you want to\n disable known hosts. (default:\n /home/USER/.ssh/known_hosts)\n -e, --sudo Escalate privileges (sudo) and prompt for password\n (default: False)\n -c COMMAND_PATH, --command-path COMMAND_PATH\n Path to tcpdump on the system. Needed if tcpdump isn't\n in your path. (default: tcpdump)\n -q, --quiet Do not take over the screen. (default: False)\n -d, --debugger\n```\n\n### Reasons this exists\n\n1. I got really sick of sshing into a machine, running `tcpdump` with all of the flags needed, scping the cap file over, and then opening it in Wireshark. Packet traces are incredibly useful in many different situations, so this was bad.\n2. Quite often, I had to capture from multiple machines at once. Take the steps above and repeat 2-10 times. I know there are things like tmux or various SSH tools to make this easier, but I wanted something simple that I could share.\n3. I got tired of fixing shell scripts I wrote to attempt to resolve 1 and 2. Bash is a wonderful, terrible thing, and it didn't really meet my needs in this context.\n4. I wanted semi-live viewing of my capture files. Being able to hit `c-R` to get new packets is nice.\n5. I wanted to have a live display of how large my capture files were growing and the rate they were growing at.\n6. I wanted more practice using `asyncio` and associated libraries. I've messed with Tornado in the past, but `asyncio` was very different and fun to learn.\n\n### Various notes\n\n* If you get tracebacks complaining about key length, you may need to disable known hosts checking. `cryptography` is a very picky library and it's hard to do much of anything about it.", "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/evanfoster/remotecap", "keywords": "tcpdump wireshark packet capture", "license": "", "maintainer": "", "maintainer_email": "", "name": "remotecap", "package_url": "https://pypi.org/project/remotecap/", "platform": "", "project_url": "https://pypi.org/project/remotecap/", "project_urls": { "Bug Reports": "https://github.com/evanfoster/remotecap", "Homepage": "https://github.com/evanfoster/remotecap", "Source": "https://github.com/evanfoster/remotecap" }, "release_url": "https://pypi.org/project/remotecap/3.0.1/", "requires_dist": null, "requires_python": ">=3.7", "summary": "Small utility to perform tcpdump on remote machines.", "version": "3.0.1" }, "last_serial": 5935836, "releases": { "2.0.0": [ { "comment_text": "", "digests": { "md5": "df002ac88f26aa17fd7c3f67fee39ae0", "sha256": "2bea8c69d88c22e4417afaff2960dfef6e5fb13bbd2b196325b0b4ad197b7d9b" }, "downloads": -1, "filename": "remotecap-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "df002ac88f26aa17fd7c3f67fee39ae0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19665, "upload_time": "2018-04-21T21:37:26", "url": "https://files.pythonhosted.org/packages/36/d1/c37f5340571395afa7f56fc8fbd2629a974d8a7d5cfa3a8e38ad4b37daaf/remotecap-2.0.0-py3-none-any.whl" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "d2353830436f281925b1cd0b0bc169c2", "sha256": "67bf3a87daad6db4d9cfd19c59610ee455299c8f0de81b02c1717be902048618" }, "downloads": -1, "filename": "remotecap-2.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d2353830436f281925b1cd0b0bc169c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19644, "upload_time": "2018-04-21T21:43:04", "url": "https://files.pythonhosted.org/packages/9d/17/beb27ad739ce550119299a8fb928fd567cae1e38427839111b6473f83a48/remotecap-2.0.1-py3-none-any.whl" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "e776988e41920dcd31233a51b54ad0ce", "sha256": "8f9b3db582b625bf71cf6f595f2cfdff327cc81f5b805820e9c2f427aa547173" }, "downloads": -1, "filename": "remotecap-2.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e776988e41920dcd31233a51b54ad0ce", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20542, "upload_time": "2018-05-06T00:41:26", "url": "https://files.pythonhosted.org/packages/36/a2/0e0cf12d6b1f0f154685f9c6c6a3d09be240c40e505f9403f87b02639367/remotecap-2.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d59d6b837917f58a55f54b761304f8a6", "sha256": "232ccf1528b50f15a4035d190f5875a28f326837a8b87fd7d2b3106723b8bec9" }, "downloads": -1, "filename": "remotecap-2.1.0.tar.gz", "has_sig": false, "md5_digest": "d59d6b837917f58a55f54b761304f8a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10582, "upload_time": "2018-05-10T23:38:49", "url": "https://files.pythonhosted.org/packages/df/1e/dad1348164a9e28d17990eb113f2d6d4b8da2c86f3a867ed09ed130ca78b/remotecap-2.1.0.tar.gz" } ], "2.1.1": [ { "comment_text": "", "digests": { "md5": "92083e1329cf4fa8bd1956c4ffba7eee", "sha256": "ebcb087f9fe25e8a71756cbedf8bd66634db26a3dd34f96119056e37e78d9ec2" }, "downloads": -1, "filename": "remotecap-2.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "92083e1329cf4fa8bd1956c4ffba7eee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 20606, "upload_time": "2018-05-10T23:40:51", "url": "https://files.pythonhosted.org/packages/88/fb/da194b016734b29d87968fa4934815e6602954e56e6f2aa6623bdb0daf66/remotecap-2.1.1-py3-none-any.whl" } ], "2.2.0": [ { "comment_text": "", "digests": { "md5": "3bbc7c8e306fa5e8fec7d8ba247a092a", "sha256": "6c6e1616a3e6c298378e0e8cbca4f7d54c876f8c390cf831b4308c5bef3cb556" }, "downloads": -1, "filename": "remotecap-2.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3bbc7c8e306fa5e8fec7d8ba247a092a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 20241, "upload_time": "2018-08-02T16:34:02", "url": "https://files.pythonhosted.org/packages/fe/03/b344c8f01a94c39183b15514536d78bce732cd7d71a044ef44b244837c89/remotecap-2.2.0-py3-none-any.whl" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "8d199ddb840ec4e297957b5a53fa191d", "sha256": "b204b3929c9015b94fa90c8646ac460cd534bfd6257daddc73e5f28be4d292fd" }, "downloads": -1, "filename": "remotecap-3.0.0.tar.gz", "has_sig": false, "md5_digest": "8d199ddb840ec4e297957b5a53fa191d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 21885, "upload_time": "2019-10-06T19:50:40", "url": "https://files.pythonhosted.org/packages/88/3c/87207db0d2e5fbb29cb2fff46949cb4195a369ced864eafe92163e331640/remotecap-3.0.0.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "3a3aa438ec92b391d7e22b553d7207bb", "sha256": "78e6efec346806e40205a713537ff2aefe40632c1e5240c85a1b92aa90fb44d4" }, "downloads": -1, "filename": "remotecap-3.0.1.tar.gz", "has_sig": false, "md5_digest": "3a3aa438ec92b391d7e22b553d7207bb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 21915, "upload_time": "2019-10-06T19:58:50", "url": "https://files.pythonhosted.org/packages/fe/9e/3833e4415dd71e5c64ee66e44b024746ca34e8118109de1f51c31da07e7c/remotecap-3.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3a3aa438ec92b391d7e22b553d7207bb", "sha256": "78e6efec346806e40205a713537ff2aefe40632c1e5240c85a1b92aa90fb44d4" }, "downloads": -1, "filename": "remotecap-3.0.1.tar.gz", "has_sig": false, "md5_digest": "3a3aa438ec92b391d7e22b553d7207bb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 21915, "upload_time": "2019-10-06T19:58:50", "url": "https://files.pythonhosted.org/packages/fe/9e/3833e4415dd71e5c64ee66e44b024746ca34e8118109de1f51c31da07e7c/remotecap-3.0.1.tar.gz" } ] }