mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 09:39:58 -06:00
wireless fine tuning
This commit is contained in:
@@ -16,6 +16,13 @@ $ssl_input = '/etc/rc.d/rc.ssl.input';
|
||||
if (is_readable($ssl_input)) extract(parse_ini_file($ssl_input));
|
||||
|
||||
switch ($argv[1]) {
|
||||
case 'reload':
|
||||
if (file_exists($ssl_input)) break;
|
||||
case 'load':
|
||||
$key = exec("dmidecode -qt1 | grep -Pom1 'Manufacturer: \K.+' | sed 's/ /_/g'")."ABCDEFGH";
|
||||
$iv = "12".exec("cat /sys/class/net/wlan0/address | sed 's/://g'")."34";
|
||||
file_put_contents($ssl_input, "cipher=aes-256-cbc\nkey=".substr($key,0,63)."\niv=$iv\n");
|
||||
break;
|
||||
case 'encrypt':
|
||||
if (!empty($argv[2]) && isset($cipher,$key,$iv)) $encrypt = openssl_encrypt($argv[2],$cipher,$key,0,$iv);
|
||||
if (!empty($encrypt)) echo "$encrypt";
|
||||
|
||||
Reference in New Issue
Block a user