14 lines
266 B
PHP
14 lines
266 B
PHP
<?php
|
|
|
|
$name = $_POST["name"];
|
|
$password = $_POST["password"];
|
|
$rootPW = $_POST["rootPW"];
|
|
|
|
$shellcommand = "echo $rootPW | sudo -S nmcli dev wifi connect $name password $password ifname wlx00e0318cea7d";
|
|
|
|
$output = shell_exec($shellcommand);
|
|
|
|
echo _($output);
|
|
|
|
?>
|
|
|