bread - Dave's Blog

Search
My timeline on Mastodon

Alternate IPv4 Forms - URI Host Syntax Notes

2012 Mar 14, 4:30

By the URI RFC there is only one way to represent a particular IPv4 address in the host of a URI. This is the standard dotted decimal notation of four bytes in decimal with no leading zeroes delimited by periods. And no leading zeros are allowed which means there's only one textual representation of a particular IPv4 address.

However as discussed in the URI RFC, there are other forms of IPv4 addresses that although not officially allowed are generally accepted. Many implementations used inet_aton to parse the address from the URI which accepts more than just dotted decimal. Instead of dotted decimal, each dot delimited part can be in decimal, octal (if preceded by a '0') or hex (if preceded by '0x' or '0X'). And that's each section individually - they don't have to match. And there need not be 4 parts: there can be between 1 and 4 (inclusive). In case of less than 4, the last part in the string represents all of the left over bytes, not just one.

For example the following are all equivalent:

192.168.1.1
Standard dotted decimal form
0300.0250.01.01
Octal
0xC0.0XA8.0x1.0X1
Hex
192.168.257
Fewer parts
0300.0XA8.257
All of the above

The bread and butter of URI related security issues is when one part of the system disagrees with another about the interpretation of the URI. So this non-standard, non-normal form syntax has been been a great source of security issues in the past. Its mostly well known now (CreateUri normalizes these non-normal forms to dotted decimal), but occasionally a good tool for bypassing naive URI blocking systems.

PermalinkCommentsurl inet_aton uri technical host programming ipv4

15 Clever, Witty Illustrations - My Modern Metropolis

2010 Mar 12, 8:58Various sometimes entertaining or humorous tshirt designs available from purchase all from Chow Hon Lam. I enjoy the ginger bread men shirt
PermalinkCommentsshirt humor tshirt design purchase gift

Animation jam: Aardman's Tim Ruffle does FlipNote Studio | Offworld

2009 Sep 20, 1:48PermalinkCommentstim-ruffle animation nintendo cute bread

Wooster Collective: The "Village Pet Store And Charcoal Grill" Opens in New York City

2008 Oct 10, 10:11"Once inside Banksy's pet store, you discover such things as breaded fish that swim in a large round bowl while hot dogs are living the high life under heat lamps in cages near the cash register."PermalinkCommentsbanksy cultural-disobediance art pet-store nyc animal video

Anthropomorphic Cannibalism - a set on Flickr

2008 Aug 26, 3:32A collection of ads featuring "food so good that it actually eats itself". I really like the hat wearing slice of bread carrying a baguette.PermalinkCommentshumor art photo food ad advertising via:boingboing

GPS Luddites - the English countryside rebels against satnav | Decentralized Information Group (DIG) Breadcrumbs

2008 Jan 2, 2:13FTA: "Seems that a number of villages in the English countryside are being overrun by errant trans-European trucks which are regularly misdirected by their GPS satnav systems onto roads that were better suited for horse-drawn carriages than big, long-distPermalinkCommentsgps humor article metadata blog england

FOAF and OpenID: two great tastes that taste great together | Decentralized Information Group (DIG) Breadcrumbs

2007 Nov 28, 4:43How to use FOAF and OpenID together and how DIG used that as a basis for commenting on their blog.PermalinkCommentsfoaf openid authentication identity rdf semanticweb trust web spam

BBQ x 2

2007 Jun 11, 3:36This past weekend I was invited to two BBQs. Consequently, the weather took a break from the heat to drizzle.

The first was a lunch BBQ in celebration of Sarah's mom getting her Masters degree. Sarah and I went to her sister's house on the East-side where we had traditional foods you might associate with a BBQ including some enjoyable sausage. There was a bit of Wii to be had and Sarah's mom killed at bowling. Sarah seemed a bit dismayed at this. I guess Sarah didn't expect it since she's had more experience compared to her mom who was playing for the first time.

For dinner we drove over to Seattle to have a BBQ at Jeannie's house. Jeannie's family and my family became friends through our church when I was born and Jeannie even babysat me. The second bit about the babysitting is how Jeannie would introduce me at the BBQ. I met her boyfriend who seems like a cool guy. He works for Microsoft as a consultant and has traveled to various countries for his job. Guests had been instructed to bring side dishes and so there was quite a spread which was eclectic as well. We brought red potatoes, humus, and pita bread. As it turns out, one of the other guests had produced humus in bulk as a supplier and apparently had a grudge against the big humus chains. We played it cool and she didn't say anything so we can only assume she didn't know it was us. Jeannie was a great hostess and I had a fun time.PermalinkCommentsbbq washington personal nontechnical

Decentralized Information Group (DIG) Breadcrumbs

2007 Mar 13, 3:57Blog on web related things (with contributor Tim Berners-Lee!)PermalinkCommentsblog rdf software w3c research monthly tim-berners-lee

timbl's blog | Decentralized Information Group (DIG) Breadcrumbs

2007 Mar 2, 6:21Sir Tim Berners-Lee blog.PermalinkCommentsblog tim-berners-lee w3c web internet rdf network
Older Entries Creative Commons License Some rights reserved.