scratch

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 49  →  ?path2? @ 50
/.htaccess
@@ -1,2 +1,2 @@
RewriteEngine on
RewriteRule "^([A-Za-z0-9]+)$" "get.php?f=$1" [QSA,L]
RewriteRule "^([A-Za-z0-9]+)$" "get.php?o=$1" [QSA,L]
/get.php
@@ -1,4 +1,31 @@
<?php
 
echo "boo";
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
require_once('inc/pseudocrypt.php');
require_once('inc/functions.php');
require_once('config.php');
 
if (!isset($_GET['o']) or empty($_GET['o'])) {
http_response_code(404);
return;
}
 
$file = array_shift(
preg_grep(
"/$_GET[o]/",
scandir($STORE_FOLDER)
)
);
 
if(!isset($file) or empty($file))
return;
 
header("Content-type: ".mime_content_type($STORE_FOLDER.'/'.$file));
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
 
echo atomized_get_contents($STORE_FOLDER.'/'.$file);
/text.php
@@ -36,7 +36,7 @@
'',
hash(
'sha512',
$fingerprint,
$fingerprint
)
),
$ASSET_HASH_SIZE
@@ -64,7 +64,7 @@
atomized_put_contents($userPath.'.html', $_POST['data']);
break;
case 'LOAD':
if(!file_exists($userPath))
if(!file_exists($userPath.'.html'))
return;
echo atomized_get_contents($userPath.'.html');
break;