Sunday, April 15, 2012

Facebook is blocked in your office? Maybe this will help you a bit ;)

I think there aren't few of you who want to access your facebook page, but the page is being blocked by the server and you can't visit it.

Maybe this will give you a hint to backdoor the security!

First of all, you should know that every website has its own ip address, which will give you a unique identifier so your system will make sure that it visits the right page, even though there are two websites with the same name.

For example, Twitter's IP address is 199.59.150.39
If you hit http://199.59.150.39 to your address bar, then boom, twitter page will show up.

But that is not only it, this IP address will then be translated again to a 'human' number which is the true unique identifier.

How? First we translate the IP address to a sequence of binary numbers.
Twitter's IP address above will be translated to:

11000111 . 00111011 . 10010110 . 00100111
(Learn how to convert a number to binary)

And then, the dots exist in between will vanish and all sequences will be joined.

11000111001110111001011000100111

Guess what, this will also be the unique identifier if you convert it back again to the decimal number,
which will give us:

3342571047

Try to check it out!
hit http://3342571047 to your address bar.

Anyway, all of these conversions can be done in python within 2 lines.

#!/usr/bin/env python
# ip_trans.py


import sys
print 'http://%i' % int(''.join([bin(int(x)+256)[3:] for x in sys.argv[1].split('.')]),2)


And run the program with an ip address as the argument:

$ python ip_trans.py 199.59.150.39
http://3342571047

No comments:

Post a Comment