ctf-resources/htb/challenges/web-looking-glass/index.php
2024-07-03 21:06:15 +02:00

19 lines
281 B
PHP

<?php
function getUserIp()
{
return $_SERVER['REMOTE_ADDR'];
}
function runTest($test, $ip_address)
{
if ($test === 'ping')
{
system("ping -c4 ${ip_address}");
}
if ($test === 'traceroute')
{
system("traceroute ${ip_address}");
}
}
?>