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.
 
 

23 lines
735 B

<?php
$rootPW = $_POST["rootPW"];
$nickname = $_POST["nickname"];
$newTorState = "bridge"
$configureFromNode2BridgeRelay1 = "echo $rootPW | sudo -S sed '0,/ORPort\ 443\nNickname/{s/ORPort\ 443\nNickname\ $nickname\nExitRelay\ 0\nSocksPort\ 0/ORPort\ 443/}' /etc/tor/torrc";
$configureFromNode2BridgeRelay2 = "echo $rootPW | sudo -S sed '0,/#BridgeRelay\ 1/{s/#BridgeRelay\ 1/BridgeRelay\ 1/}' /etc/tor/torrc";
$restartTor = "echo $rootPW | sudo -S systemctl restart tor";
$replaceTorState = "echo $newTorState > torstate.csv"
$output = exec($configureFromNode2BridgeRelay1);
$output2 = exec($configureFromNode2BridgeRelay2);
$output3 = exec($restartTor);
$output4 = exec($replaceTorState);
echo $output3;
echo " oi oi oi ";
?>