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.

187 lines
4.6 KiB

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="/createNodeAService.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 the name of your node publicly visible on the tor network </p>
  74. <input style="width:80vw;" type="text" id="nodename" name="nodename" placeholder="name"><br><br>
  75. <br><br><br><br><br><br>
  76. <p> Insert your root password </p>
  77. <input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="root pw"><br><br>
  78. <br><br><br><br><br><br>
  79. <input type="submit" value="create">
  80. </center>
  81. </form>
  82. </br></br></br></br></br>
  83. GFG;
  84. }elseif(strcmp($state,'node')==0){
  85. echo <<<GFG
  86. <p> you have a node running</p>
  87. <br><br><br><br><br><br>
  88. <form action="/change2bridge.php" method="post" enctype="multipart/form-data">
  89. <center>
  90. <p> give your bridge a name </p>
  91. <input style="width:80vw;" type="text" id="password" name="password" placeholder="nickname"><br><br>
  92. <br><br>
  93. <input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="root passwort"><br><br>
  94. <br><br><br><br><br><br>
  95. <input type="submit" value="become bridge">
  96. </center>
  97. </form>
  98. </br></br></br></br></br>
  99. GFG;
  100. }elseif(strcmp($state,'bridge')==0){
  101. echo <<<GFG
  102. <center>
  103. <p> you have a Bridge running </p><br>
  104. </center>
  105. <br><br><br><br><br><br>
  106. <form action="/change2node.php" method="post" enctype="multipart/form-data">
  107. <center>
  108. <p> type in the nickname of your middle node </p>
  109. <input style="width:80vw;" type="text" id="password" name="password" placeholder="name middle node"><br><br>
  110. <br><br>
  111. <input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="root passwort"><br><br>
  112. <br><br><br><br><br><br>
  113. <input type="submit" value="become node">
  114. </center>
  115. </form>
  116. </br></br></br></br></br>
  117. GFG;
  118. }
  119. ?>
  120. <footer>
  121. <center>
  122. <a href="mailto:contact@cannabinieri.de"><p id="linktext"><?php echo $localeYaml['contact'][$loc1]?></p></a>
  123. <p>© 2022 by Cannabinieri </p>
  124. <address>
  125. https://www.cannabinieri.de<br>
  126. E-Mail: contact@cannabinieri.de<br><br>
  127. </address>
  128. </center>
  129. </footer>
  130. </center>
  131. <center>
  132. <div id="containerdiv2">
  133. <a href="?color=deeppink"><p id="linktext"><b>pink</b></p></a>
  134. <a href="?color=lightblue"><p id="linktext">azurro</p></a>
  135. </div>
  136. </center>
  137. </body>
  138. </html>