Kbailey Posted July 12, 2010 Posted July 12, 2010 So the script eraser.py does not work. Worse, there are no clues in the server log, as it does not show me any script errors. This is a python script. The shebang is correct; it is the same as the one in another script which is working properly. This program is to overwrite a flat text file with a new rather terse one to wipe the prayer wheel clean again. The password is fed to it using a ?QUERY STRING after the name of the script, as: "http://www.theinternetprayerwheel.info/cgi-bin/eraser.py?2knockthedooropenuse1hammer". That is not the password, merely an example to illustrate the use. Here is the actual script code: #!/usr/bin/python # # import os, string, sys # print 'Content-type:text/html\n' print '<html>' print '<head>' print '<title>Erase the prayer wheel time!</title>' print '<meta http-equiv="refresh" content="10;url=http://www.theinternetprayerwheel.info/index.shtml" >' print '</head>' print '<body bgcolor="black" text="00FF00" links="0000FF"> # password=os.environ['QUERY_STRING'] # os.chdir('..') # filecontents="""<hr width=50%><marquee bgcolor="black" behavior="scroll" direction="left" delay="1" scrollamount="4" onMouseover="this.scrollAmount=0"onMouseout="this.scrollAmount=4" loop="INFINITE" >Ohm Mah Nee Pahd May Humm...</marquee><p>""" # if password="1crunchyyogayummy": print 'password OK. Erasing the wheels...<P>' f1=open('prayerwheels.txt','w') f1.write(filecontents) f1.close() print 'Wipeoff complete. AUM....<P>' else: print "<font color="FF0000"><B><BIG><BIG>WRONG!</big></big></B></face><i>GRRrrrr</i>... Woof! The temple dogs are barking!<P>" # print 'Do ZAZEN for 10 seconds for the home page. OR, you can <a href="/">CLICK ME</a> if you like.<P>' Please advise on why I get a general unspecified error. -Kirk
Wizard Posted July 13, 2010 Posted July 13, 2010 This support request is being escalated to our root admin.
Recommended Posts