domingo, 19 de outubro de 2014

Simple Reverse IP Address

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name:        ipreverse.py
# Purpose:
# Author:      xstpl@mail.ru


#-------------------------------------------------------------------------------
#install module bs4 use
# pip install beautifulsoup4 or
# apt-get install python-bs4

import urllib
import bs4

r = urllib.urlopen('http://www.meuip.com.br/')
ab = r.read()
host = bs4.BeautifulSoup(ab)
req = host.b
ip = (req.string)
xs = ip[9:]
rev = (host.h2)
reverse = (rev.br.string)


print '%s %s ' % (ip[0:8],xs)
print 'Meu IP: Reverso %s ' % (reverse[19:])