<s> """<STR_LIT>""" <EOL> import os <EOL> import socket <EOL> import sys <EOL> import cgi <EOL> import time <EOL> hostname = "<STR_LIT>" <EOL> if '<STR_LIT>' in os . environ : <EOL> hostname = os . environ [ '<STR_LIT>' ] <EOL> if hostname == "<STR_LIT>" : <EOL> ip = os . environ [ '<STR_LIT>' ] <EOL> if ip == "<STR_LIT>" : <EOL> ip = os . environ [ '<STR_LIT>' ] <EOL> try : <EOL> lookup = socket . gethostbyaddr ( ip ) <EOL> hostname = lookup [ <NUM_LIT:0> ] <EOL> except : <EOL> hostname = ip <EOL> manifestdir = "<STR_LIT>" <EOL> manifest = os . path . join ( manifestdir , hostname ) <EOL> if os . path . exists ( manifest ) : <EOL> statinfo = os . stat ( manifest ) <EOL> modtime = statinfo . st_mtime <EOL> inode = statinfo . st_ino <EOL> size = statinfo . st_size <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" % size <EOL> print "<STR_LIT>" , time . strftime ( "<STR_LIT>" , time . gmtime ( modtime ) ) <EOL> print "<STR_LIT>" , '<STR_LIT>' % ( hex ( int ( inode ) ) [ <NUM_LIT:2> : ] , hex ( int ( size ) ) [ <NUM_LIT:2> : ] , hex ( int ( modtime ) ) [ <NUM_LIT:2> : ] ) <EOL> print <EOL> f = open ( manifest , mode = '<STR_LIT:r>' , buffering = <NUM_LIT:1> ) <EOL> if f : <EOL> for line in f . readlines ( ) : <EOL> print line . rstrip ( '<STR_LIT:\n>' ) <EOL> f . close ( ) <EOL> else : <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> print </s>
