|
Title: Fun with URLs: bitaddress.org and a QR generator in URLs Post by: salfter on August 30, 2012, 05:44:51 AM I found it interesting that the bitaddress.org paper-wallet generator could be used offline if you saved it to a file. The images within worked offline, QR code generation worked offline, etc.
Poking around inside the HTML, I saw that images were stored as base64 data loaded with the data: URL scheme, a trick I hadn't run across before: <img src="data:image/png;base64,......." /> This led to a brain-fart: why not base64-encode the entire page and paste it into the address box in a browser? If your browser has some sort of bookmark-sync mechanism, it'll even get sent to every other machine using he same browser (though FWIW, this hasn't worked for me all the time on Chrome). With all that said, have a look at this (http://alfter.us/files/bitcoin-tool-urls.zip). Within you'll find two text files. Copy and paste into your browser's address box. One is a copy of bitaddress.org; the other is a QR-code generator I swiped off of Google Code, modified to show at a reasonable size on an iPhone. I used Firefox Sync to transfer them into iCab, so now I know I have a QR-code generator that runs locally on my iPhone without consulting with an untrusted website. (You can view the source in your browser to verify that it isn't calling any external resources.) Title: Re: Fun with URLs: bitaddress.org and a QR generator in URLs Post by: crazy_rabbit on August 30, 2012, 06:27:25 AM Nifty idea, but your link didn't work for me.
Title: Re: Fun with URLs: bitaddress.org and a QR generator in URLs Post by: salfter on August 30, 2012, 04:04:48 PM Nifty idea, but your link didn't work for me. There was a weird permission problem within the zipfile that I've fixed. Beyond that, if you're still using Internet Explorer, this probably won't work for you (http://en.wikipedia.org/wiki/Data_URI_scheme#Disadvantages) because IE's support for data URIs is incomplete. I've tested it with Chrome and Firefox on Windows, Chromium and Firefox on Linux, and Safari and iCab Mobile on iOS. Also, pasting the bitaddress URL can take the better part of a minute on some browsers, during which it will appear unresponsive. Once the address box updates, it should work. Calling it up from a bookmark won't incur this delay.http://en.wikipedia.org/wiki/Data_URI_scheme#Disadvantages Title: Re: Fun with URLs: bitaddress.org and a QR generator in URLs Post by: salfter on August 31, 2012, 04:01:32 PM ...and now with minified HTML and scripts, and an easier way to get them into your cellphone:
http://alfter.us/files/bitcoin-tools-compressed-urls.html (http://alfter.us/files/bitcoin-tools-compressed-urls.html) It'll show up as two links. Save the links as bookmarks (or offline bookmarks, if your browser supports it) and you're done. In addition to minifying scripts and HTML, the resulting file is URL-encoded instead of base64-encoded. With most of the whitespace gone, the bitaddress.org URL is about 136K and the QR-code URL is about 39K (vs. 232K and 66K, respectively). |