PirateBoxScripts_Webserver/piratebox/piratebox/www/cgi-bin/psowrte.py
2016-01-06 09:11:51 +01:00

31 lines
605 B
Python
Executable file

#!/usr/bin/python
# PyShoutOut by Joey C. (http://www.joeyjwc.x3fusion.com)
# Writes the recieved information to the data file.
import cgi, datetime
from psogen import process_form
print "Content-type:text/html\r\n\r\n"
values = cgi.FieldStorage()
if values.has_key("name"):
rawname = values["name"].value
else:
rawname = " "
if values.has_key("data"):
rawdata = values["data"].value
else:
rawdata = " "
color = values["color"].value
curdate = datetime.datetime.now()
process_form(rawname, rawdata, color)
print "Status:200\r\n\r\n"
print """<html><body>ok</body></html>"""