<!DOCTYPE html><html lang="en"><head>
	<meta charset="utf-8">
	<title>uploads</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=0.6">
	<style>
html,body,table,tr,td,div {
	font-family: monospace, monospace;
}
td {
	padding: .2em .5em;
}
td:first-child {
	white-space: nowrap;
}
td:first-child+td {
	text-align: right;
}
td+td+td {
	font-family: sans-serif;
}
a {
	display: block;
}
.txt {
	font-family: monospace, monospace;
	font-size: .8em;
	color: #999;
}
#head {
	line-height: 1.5em;
	border: 1px solid #999;
	padding: .3em;
	margin: 1em;
}
</style></head><body>
<?php

if (!isset($_GET['fds']) || $_GET['fds'] != 'jc')
	die();

$u = explode('?', explode('/', $_SERVER['REQUEST_URI'])[2])[0];

?>
<div id="head">
	<a href="https://eternallybored.org/misc/wget/">grab the first thing here and put it in C:\Windows\System32</a>
	then run this in cmd.exe to download all requests:<br />
	del "ocv.me\up\<?php echo $u; ?>\index.html@fds=jc" &amp; wget https://ocv.me/up/<?php echo "$u/?fds=jc"; ?> -Krl 1 -npvc -erobots=off --limit-rate=5000k<br />
	rm "ocv.me/up/<?php echo $u; ?>/index.html?fds=jc"; wget https://ocv.me/up/<?php echo "$u/?fds=jc"; ?> -Krl 1 -npvc -erobots=off --limit-rate=5000k
</div>
<table><tr>
<td>time</td><td>size</td><td>name</td></tr>
<?php

if (!isset($_GET['fds']) || $_GET['fds'] != 'jc')
	die();

function car($hay,$nee) { return (substr($hay,0,strlen($nee))===$nee); }
function cdr($hay,$nee) { return (substr($hay, -strlen($nee))===$nee); }
date_default_timezone_set('UTC');
function hsc($str)
{
	return str_replace(
		array('<','>',"\n"),
		array('&lt;','&gt;',"<br />\n"),
		$str);
}

$files = array();
$dh = opendir('.');
if (!$dh) die('fug');
while (false !== ($file = readdir($dh)))
{
	if ($file == '.' || $file == '..')
		continue;
	
	$files[] = array(filemtime($file), $file);
}
closedir($dh);
usort($files, function($a,$b)
{
	return $a[0] > $b[0];
});
foreach ($files as $file)
{
	$time = date('Y-m-d H:i:s', $file[0]);
	$name = $file[1];
	$size = filesize($name);
	echo "<tr><td>$time</td><td>$size</td><td><a href=\"$name\">$name</a></td></tr>\n";
	if (cdr($name, '.txt'))
	{
		$body = file_get_contents($name);
		$body = explode("\n", $body);
		echo "<tr><td></td><td></td><td class=\"txt\">";
		$end = min(count($body), 40);
		for ($a=0; $a<$end; $a++)
		{
			echo hsc($body[$a]) . "<br />\n";
		}
		echo "</td></tr>\n";
	}
}

