From 53f88f5d0c1a39a96944de6b630ed35d8f9d7bf0 Mon Sep 17 00:00:00 2001 From: Robert Langhammer Date: Mon, 26 Oct 2020 00:07:56 +0100 Subject: [PATCH] Add prefix to hostadresses when looking for routes /32 and /128 is not shown in ip route command but wie need it to find the route in babel. Signed-off-by: Robert Langhammer --- index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.php b/index.php index 21980fa..d7dc174 100644 --- a/index.php +++ b/index.php @@ -125,6 +125,13 @@ echo ""; if($_GET['ip'] != '') { + if ( preg_match("#/#", $_GET['ip']) == 0) { + if ( preg_match("#:#", $_GET['ip']) == 0) { + $_GET['ip'] = $_GET['ip'] . "/32"; + } else { + $_GET['ip'] = $_GET['ip'] . "/128"; + } + } echo '

Wege zu '.$_GET["ip"].'

'; echo '