Cyber Security Collaboration Survey — Tracer FIRE II
'''
if validate(form):
results = [client, str(time.time())]
for k in fields.keys():
val = form.getfirst(k)
if k == 'comments':
val = val.replace(',', ' ')
val = val.replace(':', ' ')
val = val.replace('\n', ' ')
val = val.replace('\r', ' ')
results.append('%s:%s' % (k, val))
f = open('/var/results', 'a')
f.write(','.join(results) + '\n')
f.close()
print '
SUCCESS! Your survey submission has been accepted. Please do not retake the survey. Thanks!
'
else:
print '''
FAIL! It looks like you bypassed the client-side validation of the survey! That's too easy and the contest
hasn't even begun yet! Would you please go back and just take the survey? It is very important!