Files
snootgame.xyz/views.py
2023-01-03 01:40:29 -06:00

27 lines
602 B
Python
Executable File

#!/usr/bin/python
import cgi
import cgitb
import os
import time
cgitb.enable()
epoch = 0
fileSize = os.stat("/var/www/snootgame/views.txt").st_size
if fileSize == 0:
epoch = epoch + 1
if epoch < 5:
time.sleep(0.5)
else:
quit()
storage = open("/var/www/snootgame/views.txt", 'r+')
curNum = int(storage.read())
storage.close()
curNum = curNum + 1
storage = open("/var/www/snootgame/views.txt", 'w+')
storage.write(str(curNum))
storage.close()
print("Content-Type: text/html\n\n")
with open("index.html", 'r+') as index:
for line in index.readlines():
print(line)