General Musing

blaze your trail

Posts Tagged ‘shortening

A catalog of this year’s risky articles #2010

leave a comment »

Programming Hands

Risk is something which can be difficult to evaluate for the average person, there is a lot of work which goes in to learning not to do the two things that people usually do when they are confronted with risk:

  1. Ignore
  2. Overreact

It looks like every man and his dog needs to have a Facebook page, even banks…

It has been almost 1.5 weeks since Google’s FeedBurner removed the Frie…

Some days ago I tweeted to Prosper, a personal loan marketplace, whether they…

I don’t really think most people get “it” when it comes to …

Just noticed that Google Translate translates the name of the Dutch social ne…

I find a 400 plus page manual of office policies and job descriptions for eac…

In the last two days I’ve not been posting so much, and focussing on up…

I started playing with Google Scribe and wanted to see if patterns emerged so…

I have my Google account set up with English as the preferred language, my br…

For the last 2 years LinkedIn has been running a bad poor IT management depar…

When I just started I too had trouble with getting all the items I required t…

On August 11th 2007 I exceeded my GMail quota, I blogged about it here. At th…

Brian Szymanski send a reply to me concerning another bank implementing SMS b…

I don’t understand why url expansion after url shortening is such an is…

I just read an article Web Coupons Know Lots About You, and They Tell in the …

This morning/night China’s networks were sending rerouting messages to …

The lack of trained and experienced computer security people working in small…

Last week I saw an episode of a popular Dutch Ombudsman program Kassa, they r…

After seeing a program about a lifecoach trying to find the time to get his p…

Image source Radio Nederland Wereldomroep

Advertisements

This year’s articles about programming #2010

leave a comment »

Programming Hands

In 2010 I was less focussed on programming articles on the blog than previous years, still I have managed to create some interesting articles with code in 2010. This is an overview of the activity:

Having some fun today with QR codes, JavaScript and the Google Analytics URL …

The only questions that are asked in the Daily Scrum, aka Stand-Up, are: What…

UPDATE: GMail has introduced my number 3. YEAH! (Gmail introduces Priority In…

I like YouTube, and often subscribe to new channels and unsubscribe after a w…

Since I started working for my company I’ve been exposed to PCI DSS (Pa…

I don’t understand why url expansion after url shortening is such an is…

VeriSign – Personal Identity Portal is a OpenID provider with multiple …

Image source D’Arcy Norman

Solving the URL shortening problem #twitter #tweet

leave a comment »

I don’t understand why url expansion after url shortening is such an issue that it needs to be implemented for each service separately. It relies on the same protocol HTTP and should be easy to reliably reverse this. Almost all url shortening services rely on 3xx redirection to forward the request using the Location header.

Using the example of the short URL for this post “http://wp.me/phhhb-ul“:

HEAD /phhhb-ul HTTP/1.1
HOST: wp.me

HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Tue, 20 Apr 2010 18:22:53 GMT
Content-Type: text/html
Connection: close
Location: http://webhat.wordpress.com/?p=1881
Content-Length: 0

Specifically 301 is used as search engines – such as , Yahoo! and Bing – will index the real address rather than the shortened address. Naturally this can be done by a twitter client too.

A url can be put into this script which recursively checks the url. Example run:

$ php http.php http://bit.ly/b0Y2ds
Connect to: bit.ly (128.121.254.201)
Redirection to: http://wp.me/phhhb-ul
Connect to: wp.me (76.74.254.123)
Redirection to: http://webhat.wordpress.com/?p=1881
Connect to: webhat.wordpress.com (76.74.255.123)
Redirection to: http://specialbrands.net/?p=1881
Connect to: specialbrands.net (72.233.2.58)
True URL: http://specialbrands.net/?p=1881

Quite simple really.

Written by Daniël W. Crompton (webhat)

April 20, 2010 at 8:10 pm

Posted in programming, risk, security

Tagged with , , , , ,

%d bloggers like this: