25 lines
546 B
PHP
25 lines
546 B
PHP
<?php
|
|
|
|
$rootPW = $_POST["rootPW"];
|
|
$nodename = $_POST["nodename"];
|
|
$newTorState = "node"
|
|
|
|
$configureMiddleRelay1 = "echo $rootPW | sudo -S sed '0,/#ORPort\ 443\ NoListen/{s/#ORPort\ 443\ NoListen/ORPort\ 443\nNickname\ $nodename\nExitRelay\ 0\nSocksPort\ 0/}' /etc/tor/torrc";
|
|
|
|
$restartTor = "echo $rootPW | sudo -S systemctl restart tor";
|
|
$replaceTorState = "echo $newTorState > torstate.csv"
|
|
|
|
|
|
$output3 = exec($configureMiddleRelay1);
|
|
$output4 = exec($restartTor);
|
|
$output5 = exec($replaceTorState);
|
|
|
|
|
|
|
|
|
|
echo $output3;
|
|
|
|
echo " oi oi oi ";
|
|
|
|
?>
|
|
|