the interface of the KaosCube
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
546 B

<?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 ";
?>