From fd7681930b0268fb2cfa1aeda72194241886273f Mon Sep 17 00:00:00 2001 From: penguinehis Date: Mon, 24 Nov 2025 22:10:14 -0300 Subject: [PATCH] Fix PHP 7 32 --- network.php | 40 +++++++++++++++++++++++++++------------- version.txt | 2 +- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/network.php b/network.php index 5768719..602a275 100644 --- a/network.php +++ b/network.php @@ -1,51 +1,65 @@ /sys/class/net/$netface/queues/rx-0/rps_cpus"); + shell_exec("/usr/bin/echo \"0\" > $path"); echo "Balanceamento Desativado! \n"; } else { deletecone("netsta"); incone("netsta", "null", "null", "null", "null"); - shell_exec("/usr/bin/echo \"$bit\" > /sys/class/net/$netface/queues/rx-0/rps_cpus"); + shell_exec("/usr/bin/echo \"$bit\" > $path"); echo "Balanceamento ativado! \n"; } } - function checknet() { $netface = netinter(); - $checknet = trim(shell_exec("/usr/bin/cat /sys/class/net/$netface/queues/rx-0/rps_cpus")); - $bit = bitmask(); - if (str_contains($checknet, $bit)) { + if ($netface === '') { + echo "OFF"; + return; + } + + $path = "/sys/class/net/$netface/queues/rx-0/rps_cpus"; + + $checknet = trim(@shell_exec("/usr/bin/cat $path")); + $bit = bitmask(); + + if ((int)$checknet === (int)$bit) { echo "ON"; } else { echo "OFF"; } -} \ No newline at end of file +} diff --git a/version.txt b/version.txt index ab8a90e..e11916c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -31 Year Of the Tubular Dragon \ No newline at end of file +32 Year Of the Tubular Dragon \ No newline at end of file