def get_revision():
 irev = (-1)
 try:
  sock = urllib.urlopen('https://github.com/derv82/wifite/raw/master/wifite.py')
  page = sock.read()
 except IOError:
  return ((-1), '', '')
 start = page.find('REVISION = ')
 stop = page.find(';', start)
 if ((start != (-1)) and (stop != (-1))):
  start += 11
  rev = page[start:stop]
  try:
   irev = int(rev)
  except ValueError:
   rev = rev.split('\n')[0]
   print (((R + '[+] invalid revision number: "') + rev) + '"')
 return irev

def get_revision ( ) : irev = ( - 1 ) try : sock = urllib . urlopen ( 'https://github.com/derv82/wifite/raw/master/wifite.py' ) page = sock . read ( ) except IOError : return ( ( - 1 ) , '' , '' ) start = page . find ( 'REVISION = ' ) stop = page . find ( ';' , start ) if ( ( start != ( - 1 ) ) and ( stop != ( - 1 ) ) ) : start += 11 rev = page [ start : stop ] try : irev = int ( rev ) except ValueError : rev = rev . split ( '\n' ) [ 0 ] print ( ( ( R + '[+] invalid revision number: "' ) + rev ) + '"' ) return irev
gets latest revision # from the github repository returns : revision# .