Last active
December 12, 2015 03:28
-
-
Save kolobus/4706633 to your computer and use it in GitHub Desktop.
Simple PHP backend used for ip.cx traceroute backend locations (some ot them).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$do = preg_match("/^[a-z0-9-.]+$/iD", $_GET["host"]); | |
if ($do) { | |
$host = escapeshellcmd($_GET["host"]); | |
passthru("`which traceroute` -m15 -w3 ".$host." 2>&1"); | |
} else { | |
echo "Invalid input."; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
set_time_limit(0); | |
error_reporting(0); | |
$do = preg_match("/^[a-z0-9-.]+$/iD", $_GET["host"]); | |
if ($do) { | |
$host = escapeshellcmd($_GET["host"]); | |
passthru("tracert -h 25 -w 1000 ".$host); | |
} else { | |
echo "Invalid input."; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment