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.

210 lines
5.2 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <!doctype html>
  2. <?php
  3. $lang=$_GET['lang'];
  4. if ( in_array ($lang, array('en-US'))){
  5. $loc = "$lang".".utf8";
  6. $loc1 = $lang;
  7. }
  8. else {
  9. $loc = "de-DE";
  10. $loc1 = "de-DE";
  11. }
  12. $color=$_GET['color'];
  13. if (strlen($color) <= 1){
  14. $color = "deeppink";
  15. }
  16. include "Spyc.php";
  17. $localeYaml = Spyc::YAMLLoad('locale.yaml');
  18. $domain = "messages";
  19. setlocale(LC_MESSAGES, $loc);
  20. setlocale(LC_ALL, $loc);
  21. $results = putenv("LC_ALL=$loc");
  22. $results = putenv("LC_MESSAGES=$loc");
  23. ?>
  24. <head>
  25. <meta charset="utf-8"/>
  26. <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  27. <title><?php echo $localeYaml['title'][$loc1]?></title>
  28. <link rel="stylesheet" href="css/index.css">
  29. </head>
  30. <style>
  31. body {
  32. background: <?php echo $color?>;
  33. }
  34. input[type="text"] {
  35. background: <?php echo $color?>;
  36. }
  37. input[type="text"]:focus {
  38. background: <?php echo $color?>;
  39. }
  40. </style>
  41. <body>
  42. <center>
  43. <div id="containerdiv">
  44. <a href="/"><p id="linktext"><b><?php echo $localeYaml['connect'][$loc1]?></b></p></a>
  45. <a href="changeKCPW.php"><p id="linktext"><?php echo $localeYaml['changePassword'][$loc1]?></p></a>
  46. <a href="info.php"><p id="linktext"><?php echo $localeYaml['info'][$loc1]?></p></a>
  47. <a href="onion.php"><p id="linktext"><?php echo $localeYaml['onionFeatures'][$loc1]?></p></a>
  48. <a href="freedom.php"><p id="linktext"><?php echo $localeYaml['freedom'][$loc1]?></p></a>
  49. </div>
  50. </center>
  51. <?php
  52. $state = "";
  53. $txt_file = fopen('torState.csv','r');
  54. while ($line = fgets($txt_file)) {
  55. $state = $line;
  56. $state = str_replace(array("\r", "\n"), '',$state);
  57. }
  58. fclose($txt_file);
  59. ?>
  60. <?php
  61. if(strcmp($state,'new')==0){
  62. echo <<<GFG
  63. <br><br><br><br><br><br>
  64. <center>
  65. <p> Get your first hidden service running </p>
  66. </center>
  67. <br><br><br><br><br><br>
  68. <form action="/initTorAndHS.php" method="post" enctype="multipart/form-data">
  69. <center>
  70. <p> Insert the name of your hiddenservice Project (internal name) </p>
  71. <input style="width:80vw;" type="text" id="hsname" name="hsname" placeholder="name"><br><br>
  72. <br><br><br><br><br><br>
  73. <p> Insert your root password </p>
  74. <input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="root pw"><br><br>
  75. <br><br><br><br><br><br>
  76. <input type="submit" value="init">
  77. </center>
  78. </form>
  79. </br></br></br></br></br>
  80. GFG;
  81. }elseif(strcmp($state,'hs')==0){
  82. echo <<<GFG
  83. <p> You have your hiddenservice running. Go to Info and see it's address</p>
  84. <br><br><br><br><br><br>
  85. <form action="/createNode.php" method="post" enctype="multipart/form-data">
  86. <center>
  87. <p> Insert the name of your node respectively bridge publicly visible on the tor network </p>
  88. <input style="width:80vw;" type="text" id="nodename" name="nodename" placeholder="name"><br><br>
  89. <br><br><br><br><br><br>
  90. <p> Insert your root password </p>
  91. <input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="root pw"><br><br>
  92. <br><br><br><br><br><br>
  93. <input type="submit" value="create node">
  94. </center>
  95. </form>
  96. </br></br></br></br></br>
  97. GFG;
  98. }elseif(strcmp($state,'node')==0){
  99. echo <<<GFG
  100. <p> you have a node running</p>
  101. <br><br><br><br><br><br>
  102. <form action="/switchFromNode2Bridge.php" method="post" enctype="multipart/form-data">
  103. <center>
  104. <p> give your bridge a name </p>
  105. <input style="width:80vw;" type="text" id="nickname" name="nickname" placeholder="nickname"><br><br>
  106. <br><br>
  107. <input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="root passwort"><br><br>
  108. <br><br><br><br><br><br>
  109. <input type="submit" value="become bridge">
  110. </center>
  111. </form>
  112. </br></br></br></br></br>
  113. GFG;
  114. }elseif(strcmp($state,'bridge')==0){
  115. echo <<<GFG
  116. <center>
  117. <p> you have a Bridge running </p><br>
  118. </center>
  119. <br><br><br><br><br><br>
  120. <form action="/switchFromBridge2Node.php" method="post" enctype="multipart/form-data">
  121. <center>
  122. <p> type in a new nickname of the middle node you want to create </p>
  123. <input style="width:80vw;" type="text" id="nodename" name="nodename" placeholder="name middle node"><br><br>
  124. <br><br>
  125. <input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="root passwort"><br><br>
  126. <br><br><br><br><br><br>
  127. <input type="submit" value="become node">
  128. </center>
  129. </form>
  130. </br></br></br></br></br>
  131. GFG;
  132. }
  133. ?>
  134. <footer>
  135. <center>
  136. <a href="mailto:contact@cannabinieri.de"><p id="linktext"><?php echo $localeYaml['contact'][$loc1]?></p></a>
  137. <p>© 2022 by Cannabinieri </p>
  138. <address>
  139. https://www.cannabinieri.de<br>
  140. E-Mail: contact@cannabinieri.de<br><br>
  141. </address>
  142. </center>
  143. </footer>
  144. </center>
  145. <center>
  146. <div id="containerdiv2">
  147. <a href="?color=deeppink"><p id="linktext"><b>pink</b></p></a>
  148. <a href="?color=lightblue"><p id="linktext">azurro</p></a>
  149. </div>
  150. </center>
  151. </body>
  152. </html>