Files
CTF/HTB/pollution/target/var.www.collect.app.controllers.api.php
Simon 82b0759f1e init htb
old htb folders
2023-08-29 21:53:22 +02:00

24 lines
463 B
PHP

<?php
if(!is_admin())
{
die(redirect('/home'));
}
if(!isset($_POST['manage_api']) or empty($_POST['manage_api']))
{
die(redirect('/home'));
}
libxml_disable_entity_loader(false);
$dom = new DOMDocument();
$dom->loadXML($_POST['manage_api'], LIBXML_NOENT | LIBXML_DTDLOAD);
$xml = simplexml_import_dom($dom);
header('Content-type: application/json');
echo(curl_api($xml->method, "http://localhost:3000{$xml->uri}", $xml->user));
die();