From 458ca31cc617831dbe05d129fffa5e023c06d3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 10 Jan 2023 11:53:56 +0100 Subject: metadl works, but wastes bandwidth --- www/index.php | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 www/index.php (limited to 'www/index.php') diff --git a/www/index.php b/www/index.php new file mode 100644 index 0000000..2fd5a92 --- /dev/null +++ b/www/index.php @@ -0,0 +1,77 @@ +"; + while (false !== ($entry = readdir($handle))) { + if (preg_match("/torrent$/", $entry)) { + $h = htmlspecialchars(explode(".", $entry)[0]); + echo '
  • ' . $h . ''; + } + } + die(); + closedir($handle); + } else { + die("ne morem brati direktorija"); + } +} +if (!preg_match("/^[a-f0-9A-F]{40}$/", $_REQUEST["h"])) + die('!preg_match("/^[a-f0-9A-F]{40}$/", $_REQUEST["h"])'); +$t = TorrentFile::load("../".$_REQUEST["h"].".torrent"); +?> + + +

    getName()) ?>

    +<?= htmlspecialchars($t->getName()) ?> + + + + + + + + + + + isPrivate()) echo ""; ?> + + + + + + + + + + + + + +getRootData()["source"]["v"]) { ?> + + + + +
    pridobljenogetCreationDate()) ?>
    tipgetProtocol() ?>
    datotečni načingetFileMode() ?>
    zaseben
    magnetna povezava
    .torrent>torrent datoteka
    velikostgetSize()/(1024*1024*1024), 6, ",", "") ?> GiB
    število datotekgetFileCount() ?>
    ip naslov viragetRootData()["source"]["ip"]) ?>
    odjemalec viragetRootData()["source"]["v"]) ?>
    + " . htmlspecialchars($k) . ""; + } else { + echo "
  • " . htmlspecialchars($k) . " (" . number_format($v/(1024*1024), 6, ",", "") . " MiB)"; + } +} +echo ""; +?> -- cgit v1.2.3