Redirect + trackers + php upload api + binary tree search + uuids

This commit is contained in:
relikd
2020-08-29 14:44:01 +02:00
parent ec6e4b5a90
commit 1d731e709f
17 changed files with 16565 additions and 99 deletions

View File

@@ -24,9 +24,21 @@ def gen_root():
</a>{}'''. format('')))
def gen_search():
with open(mylib.path_out('redirect.html'), 'w') as fp:
fp.write(mylib.template_with_base('''
<h2>Redirecting …</h2>
<script type="text/javascript">
var GET={};
window.location.search.substr(1).split("&").forEach(function(x){GET[x.split("=")[0]]=x.split("=")[1]});
if (GET["id"]) { window.location = "/app/" + GET["id"] + "/index.html"; }
</script>'''))
def process():
print('generating root html ...')
gen_root() # root index.thml
gen_search() # root redirect.html?id=my.bundle.id
if __name__ == '__main__':