kc-interface/changeKCPWaction.php
2022-12-20 14:30:30 +01:00

19 lines
445 B
PHP

<?php
$rootPW = $_POST["rootPW"];
$pwNewKc = $_POST["pwNewKc"];
$shellcommand = "echo $rootPW | sudo -S nmcli con modify kaoscube 802-11-wireless-security.psk $pwNewKc";
$commandAPdown = "echo $rootPW | sudo -S nmcli con down kaoscube";
$commandAPup = "echo $rootPW | sudo -S nmcli con up kaoscube";
$output = exec($shellcommand);
$output2 = exec($commandAPdown);
$output3 = exec($commandAPup);
echo _($output3);
echo _(" oi oi oi ");
?>