Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I recently read an article on Hacking a commercial airport WLAN. It's basically about circumventing paid airport WiFi redirections (they redirect you to a certain URL when you type something in the address bar).

You just add ?.jpg and tada, you've done it.

My question is: Why does this work?

share|improve this question

migrated from superuser.com Jan 28 '13 at 19:49

This question came from our site for computer enthusiasts and power users.

7  
It is worth noting that this wouldn't work on all services, just particularly poorly implemented ones. –  AJ Henderson Jan 28 '13 at 20:29
    
only airports? what if you leave the page by clicking a link? –  purcitron Aug 21 at 17:44

1 Answer 1

up vote 33 down vote accepted

Most probably the blocker is designed to let images through, maybe because they are hotlinking some images on the page where they ask for you to login.

Appending ?.jpg to the URL makes the blocker think that the URL is an image. On the other hand, anything after the ? doesn't change the actual webpage requested, it only changes the GET headers. (so http://google.com/?.jpg and http://google.com/ give the same page).

Note that if there already is a query string in the URL (something after a question mark), then you must use &.jpg instead of ?.jpg, as only the first question mark is considered for making a query string (the second question mark is considered as part of the data, generally, and this may lead to you getting the wrong page)

Basically, when you fetch a page, you can provide additional data to the server (which can then send you a custom page dependant on your data). There are two ways of doing this: a GET request and a POST request. A GET request puts the data in the URL itself, a POST request sends in in a more subtle, 'hidden' way. Here is an example GET request on the "ask question" page of SuperUser. A note: it is not necessary that there is data when you use a GET request. When you fetch a normal webpage, that is also a GET request, without data.

share|improve this answer
1  
That sounds logical, but may I ask what a 'GET header' is? –  ZafarS Jan 28 '13 at 19:40
    
@ZafarS: see edit –  Manishearth Jan 28 '13 at 19:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.