#!/usr/bin/env python
# encoding: utf-8
"""
allow.py

Created by Thomas Mangin on 2011-11-29.
Copyright (c) 2011-2013  Exa Networks. All rights reserved.
"""

import sys

def reply (response):
		sys.stdout.write(response + '\n')
		sys.stdout.flush()

try:
	while True:
		data = sys.stdin.readline().strip()

		url, ip, _, method, __ = data.split()

		if method == 'CONNECT':
			reply('http://www.surfprotect.co.uk/')
			continue
		if url.endswith('.net'):
			reply('')
			continue
		reply('http://www.surfprotect.co.uk/')

except KeyboardInterrupt, e:
	sys.stderr.write('^C keyboard interrupt. exiting.\n')
	sys.stderr.flush()
except Exception, e:
	sys.stderr.write('CHILD FAILED %s\n' % str(e))
	sys.stderr.flush()
