{"id":18055986,"url":"https://github.com/grahamedgecombe/lancat","last_synced_at":"2025-04-11T02:06:45.420Z","repository":{"id":9253524,"uuid":"11077321","full_name":"grahamedgecombe/lancat","owner":"grahamedgecombe","description":" Zero-configuration LAN file transfer.","archived":false,"fork":false,"pushed_at":"2013-06-30T21:51:12.000Z","size":128,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T02:05:31.792Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"http://grahamedgecombe.com/projects/lancat","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grahamedgecombe.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-30T20:43:13.000Z","updated_at":"2024-11-06T11:54:30.000Z","dependencies_parsed_at":"2022-09-01T05:12:41.747Z","dependency_job_id":null,"html_url":"https://github.com/grahamedgecombe/lancat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grahamedgecombe%2Flancat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grahamedgecombe%2Flancat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grahamedgecombe%2Flancat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grahamedgecombe%2Flancat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grahamedgecombe","download_url":"https://codeload.github.com/grahamedgecombe/lancat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328168,"owners_count":21085261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby"],"created_at":"2024-10-31T01:13:08.770Z","updated_at":"2025-04-11T02:06:45.362Z","avatar_url":"https://github.com/grahamedgecombe.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"lancat\n======\n\nIntroduction\n------------\n\nlancat allows simple zero-configuration file transfer over a local area\nnetwork.\n\nAs a quick example - to send `hello.txt` from machine A to machine B, the\nfollowing command should be executed on the sending machine (A):\n\n    lancat -s \u003c hello.txt\n\nand the following command should be executed on receiving machine (B):\n\n    lancat -r \u003e hello.txt\n\nThe two commands can be executed in any order - either one will wait for the\nother.\n\nThere is no need to remember or figure out the IP address of the other machine,\nso this is particularly useful for a quick file transfer on networks where DHCP\nis used.\n\nHowever, be warned: on a shared network, you should not use lancat to transfer\nconfidential data (unless you combine it with a command to do encryption - see\nthe example below) - the data is transferred in the clear. Furthermore, anybody\nelse on your local network could run a `lancat` command before you do so on the\nsecond machine, and lancat will happily send your data to them instead. Oops!\n\nInstallation\n------------\n\nYou'll need [Ruby 1.9 or above][ruby] on your machine. lancat is a Ruby gem so\nit can simply be installed with the following command:\n\n    gem install lancat\n\nYou may need to use `sudo` or `su` to install it as the root user.\n\nRubygems should automatically add the executable to your `$PATH`, so after\ninstalling the gem, running `lancat` should just work.\n\nMore examples\n-------------\n\n### Show status of the transfer with `pv`\n\nIf you are transferring a large file, you could use `pv` command on the sender\nto monitor the progress of the transfer:\n\n    pv hello.txt | lancat -s\n\nor if you wanted to see the progress on the receiver:\n\n    lancat -r | pv \u003e hello.txt\n\nHowever, on the receiving end, `pv` will probably not be able to make a guess\nof the total file size, so you'll only be able to see the rate of the transfer.\nTherefore, it's probably better to use `pv` on the sending machine.\n\n### Transfer several files at once with `tar`\n\nlancat is only capable of sending a single file at once. However, it can be\ncombined with `tar` to send several files. On the sender:\n\n    tar cf - file1.txt file2.txt file3.txt | lancat -s\n\nand on the receiver:\n\n    lancat -r | tar xf -\n\n### Compress large files\n\nFor sending large files over a slow network, a compression program such as\n`gzip`, `bzip2`, `lzma`, `xz`, etc. could be used. On the sender:\n\n    xz -c really_big_file.dat | lancat -s\n\nand on the receiver:\n\n    lancat -r | xz -dc \u003e really_big_file.dat\n\n### Symmetric encryption\n\nDespite the warning in the introduction, if you insist on using lancat to send\nconfidential data, you could combine it with a program that performs symmetric\nencryption such as OpenSSL. On the sender:\n\n    openssl aes-256-cbc -in nuclear_launch_codes.txt | lancat -s\n\nand on the receiver:\n\n    lancat -r | openssl aes-256-cbc -d -out nuclear_launch_codes.txt\n\nOnce you've entered the passphrase on both ends, the transfer will commence but\nif anybody does try to sniff the traffic, or sneakily run the `lancat` command\non their own machine before you can run on it your second machine, they'll see\nthe cipher text instead of the plain text.\n\n### X11 clipboard\n\nThe `xclip` command could be used to send the contents of the clipboard over\nthe network - I frequently need a way to copy complicated URLs between machines.\nOn the sender:\n\n    xclip -o -selection clipboard | lancat -s\n\nand on the receiver:\n\n    lancat -r | xclip -i -selection clipboard\n\n### and more...?\n\nAs lancat follows the 'UNIX philosophy' of doing one thing well and being\nusable within a shell pipeline, I'm sure there are many other cool things that\ncould be done with it. If you come up with anything particularly good, which\nother people may find useful, then let me know and I'll include it in this\ndocumentation.\n\nHow it works\n------------\n\nThe sender opens a TCP server socket on a random port. It then sends out UDP\nmulticast packets every second, which contain the server socket's port number,\nuntil the receiver connects to the server socket, or the timeout has passed.\n\nThe receiver waits to receive one of these UDP multicast packets. Once it has\ndone so, it opens a TCP client socket. It connects the socket to the IP address\nthe UDP packet was from, and to the port contained within the UDP packet.\n\nAfter both sides have established the TCP connection, the sender sends all the\ndata from `stdin` to the receiver. The receiver writes everything it receives to\n`stdout`. Once they reach the end of the file, the socket is closed and both\nprograms terminate.\n\nBut it doesn't concatenate!\n---------------------------\n\nYes, but lancat sounds cooler, and it is easier to say than lancp.\n\nLicense\n-------\n\nlancat is released under the [ISC license][isc]. See the `LICENSE` file for the\ncopyright notice and license text.\n\n[ruby]: http://www.ruby-lang.org/\n[isc]: http://www.tldrlegal.com/license/isc-license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrahamedgecombe%2Flancat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrahamedgecombe%2Flancat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrahamedgecombe%2Flancat/lists"}