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

  1. <?php
  2. $rootPW = $_POST["rootPW"];
  3. $nodename = $_POST["nodename"];
  4. $newTorState = "node"
  5. $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";
  6. $restartTor = "echo $rootPW | sudo -S systemctl restart tor";
  7. $replaceTorState = "echo $newTorState > torstate.csv"
  8. $output3 = exec($configureMiddleRelay1);
  9. $output4 = exec($restartTor);
  10. $output5 = exec($replaceTorState);
  11. echo $output3;
  12. echo " oi oi oi ";
  13. ?>