initial commit
This commit is contained in:
20
index.html
Normal file
20
index.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<html>
|
||||||
|
<head><title>Upload</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style.css">
|
||||||
|
</head>
|
||||||
|
<body class=box>
|
||||||
|
<div class=head>
|
||||||
|
<h3>Datei-Upload</h3>
|
||||||
|
|
||||||
|
Dateien können nur einzeln hochgeladen werden, es bietet sich also an die Dateien in ein Archiv (zip, tar o.ä.) zu verpacken.
|
||||||
|
Uploads bitte per Mail an mich ankündigen, sonst kriege ich es evtl nicht mit.<br>
|
||||||
|
Danke!
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<form action="up.run" method="post" enctype="multipart/form-data">
|
||||||
|
Datei auswählen: <input type="file" name="myfile" /> <br />
|
||||||
|
<!--input type="hidden" name="MAX_FILE_SIZE" value="5000" /-->
|
||||||
|
<input type="submit" name="submit" value="Submit" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</body></html>
|
||||||
36
style.css
Normal file
36
style.css
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
div.box {
|
||||||
|
color:#cecece;
|
||||||
|
background-image: url('https://dukun.de/linen_login.jpg');
|
||||||
|
background-size: 100%;
|
||||||
|
width: 100%;
|
||||||
|
height: 90%;
|
||||||
|
margin: 0px auto;
|
||||||
|
overflow: auto;
|
||||||
|
padding:10px;
|
||||||
|
border-radius:10px;
|
||||||
|
box-shadow: 0px 0px 20px #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-image:url('https://dukun.de/linen.jpg');
|
||||||
|
background-repeat:repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.head {
|
||||||
|
width: 90%;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.foot {
|
||||||
|
width: 90%;
|
||||||
|
margin:auto;
|
||||||
|
margin-top:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.foot a {
|
||||||
|
color: #0000aa;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color:#8080ee;
|
||||||
|
}
|
||||||
30
up.run
Executable file
30
up.run
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
print("Content-type: text/html\n")
|
||||||
|
import os
|
||||||
|
import cgi
|
||||||
|
import cgitb
|
||||||
|
|
||||||
|
|
||||||
|
origin_url = "https://augustiner-kantorei.de/upload"
|
||||||
|
|
||||||
|
cgitb.enable()
|
||||||
|
form = cgi.FieldStorage()
|
||||||
|
fileitem = form['myfile']
|
||||||
|
|
||||||
|
if fileitem.filename:
|
||||||
|
# strip leading path from file name to avoid
|
||||||
|
# directory traversal attacks
|
||||||
|
fn = os.path.basename(fileitem.filename)
|
||||||
|
open('../downloads/' + fn, 'wb').write(fileitem.file.read())
|
||||||
|
|
||||||
|
print(f"""
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<!--meta http-equiv="refresh" content="0; url={origin_url}" /-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Erfolgreich hochgeladen</h2>
|
||||||
|
<a href={origin_url}>Zurück zur Maske</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
""")
|
||||||
Reference in New Issue
Block a user