
| Current Path : /proc/self/root/usr/lib/cgi-bin/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //proc/self/root/usr/lib/cgi-bin/make12git.py |
#!/usr/bin/python3
import os,re,cgi
print("Content-Type: text/html;charset=utf-8")
print ("Content-type:text/html\r\n")
form = cgi.FieldStorage()
repo = form.getvalue("vi8erw45")
DELETE = 0
if repo[0] == ".":
DELETE = 1
repo = repo[1:]
if re.search(r"[^0123456789abcdef]",repo):
print("NOT VALID")
else:
if DELETE == 1:
os.system("rm -R /var/www/repos/03_12park_cloud.git/"+repo+".git > /dev/null")
print(repo + " deleted.")
else:
os.system("git init --bare /var/www/repos/03_12park_cloud.git/"+repo+".git > /dev/null")
print(repo + " created.")