4 ms·
From the README: This program binds a web server to the address of your wifi network interface on a random port, and sets a default handler for it. The default
by daw___ 9y ago
From the README:
This program binds a web server to the address of your wifi network interface on a random port, and sets a default handler for it. The default handler serves the content and quits the program when the transfer is complete.
The program prints a QR code that encodes the text:
http://{address}:{port} http://{address}:{port}
Most QR apps can detect URLs in decoded text and act accordingly (i.e.: open the URL with the default browser), so when QR the code is scanned the content starts being downloaded by the mobile browser.
- koolba 9y agoWhy not add a random suffix? http://{address}:{port}/{32-bytes http://{address}:{port}/{32-bytes from /dev/urandom as hex} If the URL isn't being manually entered (I mean that's the whole point of the QR code right?) then adding some random unguessable text would solve the problem of something else on your network connecting to that port. It doesn't solve the problem entirely as it's still possible to MITM the HTTP connection but it's a tad more difficult.
- daw___ 9y agoThanks, very good point. Initially I thought that shorter the better for URL, but since it doesn't have to be entered then it makes sense to make it a bit longer to be unguessable (and for sake of completeness, the port is randomly decided at each run).
- Zenbit_UX 9y agoI'd actually rather not have this addition. Despite your marketing this as a desktop > mobile transfer right now there's no reason your app can't be used for desktop > desktop sharing unless you add that random string. I can see myself using this to move files quickly between a desktop and a laptop or vice versa by ignoring the QR code and just putting in the port. Alternatively you could try the gfycat method by appending a few adjectives and a noun to create a readable but nonsensical phrase: https://gfycat.com/enlightenedpositiveasianporcupine https://gfycat.com/enlightenedpositiveasianporcupine But IMHO If security on your own network is so intense that a random app opening temporarily on a random local port is a security concern then this app isn't for you.
- koolba 9y agoThat’s what netcat is for! Host A: $ nc -l 12345 < data.txt Host B: $ nc host-a-or-its-ip 12345 > data.txt
- Zenbit_UX 9y agoSure that's useful, thanks. Although his app handles both use cases (desktops & phones).
- jakobegger 9y agonc is probably already installed on your desktop, though
- arantius 9y agohttp://www.home.unix-ag.org/simon/woof.html http://www.home.unix-ag.org/simon/woof.html
- jermaustin1 9y agoOr to be less dependent on a specific OS, use a hash of the file's name/path/content?
- woodrowbarlow 9y agooh, this is clever! i was worried that it would upload my file to a cloud service, or that i would need to install a custom app on my phone.
- daw___ 9y agoThanks! That's the fastest thing I could came up with to solve the problem of moving a tiny little piece of data between my computer and my smartphone without installing apps or physically connecting the device and using `adb`!