ctf-resources/htb/challenges/web-looking-glass/index.php

20 lines
281 B
PHP
Raw Normal View History

2024-07-03 21:06:15 +02:00
<?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}");
}
}
?>