diff options
Diffstat (limited to 'info.cgi')
-rwxr-xr-x | info.cgi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/info.cgi b/info.cgi new file mode 100755 index 0000000..6b65301 --- /dev/null +++ b/info.cgi @@ -0,0 +1,18 @@ +#!/usr/bin/python + +import cgi, cgitb, os, time, urllib, sch +cgitb.enable() + +form = cgi.FieldStorage() + +if not form.has_key("fname"): + sch.error("No file name passed to script file") + +fname = form["fname"].value + +if not sch.valid_fname(fname): + sch.error("Fuck off!") + +sch.print_header("File Info for '%s'" % fname) +sch.run_proc('/usr/local/bin/syrep --info "%s/%s" ' % (sch.repository_directory, fname)) +sch.print_footer() |