Why can you bypass restricted WiFis by adding "?.jpg" to the URL?
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
?.jpgand tada, you've done it.
My question is: Why does this work?
It is worth noting that this wouldn't work on all services, just particularly poorly implemented ones.
only airports? what if you leave the page by clicking a link?
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.
?.jpgto 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
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, 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
GETrequest and a
GETrequest puts the data in the URL itself, a
POSTrequest 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
GETrequest. When you fetch a normal webpage, that is also a
GETrequest, without data.