Nice! (Shameless plug follows) I use a similar technique in the notify-run Python package for setting up push notifications to an Android device from Python: <a href="https://github.com/paulgb/notify.run/blob/master/py_client/README.rst" rel="nofollow">https://github.com/paulgb/notify.run/blob/master/py_client/R...</a>
From the README:<p>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.<p>The program prints a QR code that encodes the text:<p><a href="http://{address}:{port}" rel="nofollow">http://{address}:{port}</a><p>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.
An innovative idea, I like it and could think of using it. Actually it would be more helpful if there was a way to transfer multiple files in a reasonable manner. While the server implementation would be trivial, the mass downloading client on the mobile phone is obviously the tricky part. Effective file managament on the mobile phone is even bad on Android, in my experience.
This is amazing. Always looking for something like this. The old way I used to do is to run a HTTP server with an upload form in the mobile phone. But this requires an app on phone to run that server.<p>The idea of QR code is amazing. I'll put this to my news letter next week. Look out for it
I’ve experimented with this for a while. My clients often have very locked down windows laptops but they oddly allow hand typed powershell scripts to run.<p>If you “play” a series of qr codes with checksums and record them from a phone and process the video on the phone you can exfil data without tripping any IDS.<p>Opening a port often requires privileges or can at least trip an IDS. Silly really.
Looks useful and fun, however it does not seem to work correctly with ipv6 on mac? I obtain:<p><pre><code> 2018/03/22 18:46:55 listen tcp: address fe80::XX:XXXX:XXX:XXXX:57532: too many colons in address</code></pre>
Great project! I'm working on one that's somewhat related, it's basically cross-platform AirDrop (though only for laptops). Seems like mine could really benefit from a method of getting files to phones like this, and yours could benefit from not needing a wireless network like Flying Carpet. <a href="http://github.com/spieglt/flyingcarpet" rel="nofollow">http://github.com/spieglt/flyingcarpet</a>
Here is a small issue:
<a href="https://github.com/claudiodangelis/qr-filetransfer/blob/master/main.go#L65" rel="nofollow">https://github.com/claudiodangelis/qr-filetransfer/blob/mast...</a><p>I don't know if it is the barcode scanner app (I use the one from zxing, a very popular choice), or the Android implementation (LG, Android 7), but here is a description of what happens:<p>As soon as I scan the barcode, it is copied to the clipboard. Then something goes to check if the URL is working (the barcode app? android clipboard? not sure). Since you exit after the first request, my browser never gets the chance to download the file.
If I remove the os.Exit(), I get it working (and then terminate qr-filetransfer via ctrl+c).<p>Anyhow, very nice work. Kudos!
did something similar with features like upload,view files before download and file creation time (shameless plug :P ) <a href="https://github.com/kamilkabir9/LDrop" rel="nofollow">https://github.com/kamilkabir9/LDrop</a>
Looks like a cool project! Only quickly glanced at the code but couldn’t find it: where does this transfer files to on an iOS device? Does it even work with iOS?
Doesn't work here. As soon as I scan the QR code with my phone, I'm prompted by the barcode-scanner app to open the URL (192.168.15.whatever) on the browser, but at the time this happens qr-filetransfer is already closed and not listening anymore, it has closed immediately when the QR code was read.<p>How does it happen I cannot know.
That's pretty cool. I wonder if it could be adapted to use something like Nextcloud to avoid the requirement of being on the same wifi.<p>The workflow would be something like: Upload to Nextcloud (it would need to ask username/password) => Get Nextcloud URL (eg via WebDAV) => Create QR code.
nice, thanks.<p>would be nice if it could allow pipes. example to send the clipboard:<p>$ pbpaste | qr-filetransfer
2018/03/22 15:06:48 At least one argument is required