Easy, one-time and secure file transfer with the magic wormhole!

Ah, it's been a while...

Hello readers who probably believed this blog to be abandoned. While I haven't written anything here in a few months, I think I have a few upcoming posts (I just got a raspberry pi, so if I can think up any interesting projects /uses for it I'll certainly post them here). Now, though, I'd like to share a nice little tool I just came across.

So I regularly browse what's trending on Git Hub to see what's getting the attention of the open source community, in hopes to find any nifty tools / libraries / awesome lists I don't already know about. There's always something new and usually something interesting; today was no different. Only... I found a particularly useful tool. It's called magic-wormhole, and it's so simple your average point-and-click, semi-computer literate monkey can use it. Assuming, that is, that they can find their command prompt / terminal. Sorry if you are such an aforementioned clickmonkey; no-one blames you. Well. Ok... I don't. :P Any how, one of the more interesting things about this application is exactly how it's used. There isn't a server where you upload your files, no automagically updating folder like dropbox... Not even any configuration of devices and folders like Syncthing requires. You just give it a piece of text or a file, and it gives you a few codewords you give to the person who you want to receive your stuff. It is like Syncthing in the fact that it's peer to peer, which means you send your data streight to the person who's receiving it, although it might go through a relay if you can't directly connect to them. This thing isn't meant for your average file sharing... It's meant for when people are talking to each other (face to face, over the phone, chatting, what have you), but their computers are not. This is what I mean by "one-time". You run a command, provide a file or some text, get your codewords, tell someone the codewords, they run their client, get the file, and then it's done. They have the file, your client closes. Mission accomplished. Rather than upload your file to dropbox and give the other person it's link, you can just send it to them directly. It's also encrypted, unlike most other easy methods of transfering files, has no space restriction, and is only limited by your upload speed. Oh yeah... And you can also upload directories. Personally, I have had to upload a file to my webserver so many times just so one person could get it, because my dropbox links were suspended, because I was low on space, because I didn't want to make a shared folder with them for one little file, etc... So much work... I have to log in with filezilla or something similar and upload the file. Granted, that's not much work really, but I almost always have a terminal open and I'm super lazy... Much easier to just "wormhole send my.file". While the linux readers might be muttering to themselves about things like scp, ssh and rsync, remember that most people haven't been enlightened yet and windows obviously doesn't come with them by default (thanks, git for windows, now where's rsync!)

Another aspect I like about this program is that you can host the server that handles matching codewords to connection info, as well as the relay server that will send TCP packets through to a receiver if their firewall isn't allowing a direct conection. [Yay, self hostable!]

The more experienced readers (aka linux nerds) might think to ask why there's a need for this tool at all. After all, we have gpg with email, ssh and scp... All of which require previous arrangements in the form of keys or email addresses exchanged. For a quick file transfar to someone you have no prior key for, this works great as a commandline tool for me. For more on why you might want to use this project over other alternatives, see the motivation section of the README.

To install this, you'll need python 2.7 (python 3 support doesn't fully work yet, as I understand) and pip. There are instructions to fix some missing dependencies you might run into on Debian / Ubuntu in the README for the repository; check there if your having issues. If you have python and pip (go you), just:

pip install magic-wormhole

For those who don't have python and really don't feel like installing it, I'll most likely be posting an executable of the tool here later (either using pyinstaller or py2exe).

If this sounds like something you and others you know would use, check it out. Heh heh... See what I did there? Check it out..... Yeah nevermind...

If you found this useful or you have other awesome projects you'd like to share, feel free to comment below.

Until next time...