Bitcoin Forum
May 05, 2024, 05:19:41 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Fun with URLs: bitaddress.org and a QR generator in URLs  (Read 1195 times)
salfter (OP)
Hero Member
*****
Offline Offline

Activity: 651
Merit: 501


My PGP Key: 92C7689C


View Profile WWW
August 30, 2012, 05:44:51 AM
 #1

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.  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.)

Tipjars: BTC 1TipsGocnz2N5qgAm9f7JLrsMqkb3oXe2 LTC LTipsVC7XaFy9M6Zaf1aGGe8w8xVUeWFvR | My Bitcoin Note Generator | Pool Auto-Switchers: zpool MiningPoolHub NiceHash
Bitgem Resources: Pool Explorer Paper Wallet
1714929581
Hero Member
*
Offline Offline

Posts: 1714929581

View Profile Personal Message (Offline)

Ignore
1714929581
Reply with quote  #2

1714929581
Report to moderator
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714929581
Hero Member
*
Offline Offline

Posts: 1714929581

View Profile Personal Message (Offline)

Ignore
1714929581
Reply with quote  #2

1714929581
Report to moderator
1714929581
Hero Member
*
Offline Offline

Posts: 1714929581

View Profile Personal Message (Offline)

Ignore
1714929581
Reply with quote  #2

1714929581
Report to moderator
crazy_rabbit
Legendary
*
Offline Offline

Activity: 1204
Merit: 1001


RUM AND CARROTS: A PIRATE LIFE FOR ME


View Profile
August 30, 2012, 06:27:25 AM
 #2

Nifty idea, but your link didn't work for me.

more or less retired.
salfter (OP)
Hero Member
*****
Offline Offline

Activity: 651
Merit: 501


My PGP Key: 92C7689C


View Profile WWW
August 30, 2012, 04:04:48 PM
 #3

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 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

Tipjars: BTC 1TipsGocnz2N5qgAm9f7JLrsMqkb3oXe2 LTC LTipsVC7XaFy9M6Zaf1aGGe8w8xVUeWFvR | My Bitcoin Note Generator | Pool Auto-Switchers: zpool MiningPoolHub NiceHash
Bitgem Resources: Pool Explorer Paper Wallet
salfter (OP)
Hero Member
*****
Offline Offline

Activity: 651
Merit: 501


My PGP Key: 92C7689C


View Profile WWW
August 31, 2012, 04:01:32 PM
 #4

...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

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).

Tipjars: BTC 1TipsGocnz2N5qgAm9f7JLrsMqkb3oXe2 LTC LTipsVC7XaFy9M6Zaf1aGGe8w8xVUeWFvR | My Bitcoin Note Generator | Pool Auto-Switchers: zpool MiningPoolHub NiceHash
Bitgem Resources: Pool Explorer Paper Wallet
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!