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.

26 lines
769 B

1 year ago
1 year ago
1 year ago
  1. <?php
  2. $rootPW = $_POST["rootPW"];
  3. $hsname = $_POST["hsname"];
  4. $nodename = $_POST["nodename"];
  5. $newTorState = "node"
  6. $configureHiddenService1 = "echo $rootPW | sudo -S sed -i 's/#HiddenServiceDir\ \/var\/lib\/tor\/hidden_service/HiddenServiceDir\ \/var\/lib\/tor\/$hsname/' torrc";
  7. $configureHiddenService1 = "echo $rootPW | sudo -S sed '0,/#HiddenServiceP/{s/#HiddenServicePort\ 80 127.0.0.1:80/HiddenServicePort 80 127.0.0.1:80\nHiddenServicePort 22 127.0.0.1:22/}' torrc";
  8. $confiureNode = "echo $rootPW | sudo -S sed -i ";
  9. $restartTor = "echo $rootPW | sudo -S ";
  10. $replaceTorState = "echo $newTorState > torstate.csv"
  11. $output = exec($shellcommand);
  12. $output2 = exec($commandAPdown);
  13. $output3 = exec($commandAPup);
  14. echo _($output3);
  15. echo _(" oi oi oi ");
  16. ?>