Browse Source

first commit

master
corsaronero 1 year ago
commit
ee3d8e402c
26 changed files with 2815 additions and 0 deletions
  1. +1178
    -0
      Spyc.php
  2. +110
    -0
      changeKCPW.php
  3. +2
    -0
      changeKCPW.sh
  4. +19
    -0
      changeKCPWaction.php
  5. +14
    -0
      connect2Network.php
  6. +10
    -0
      connections.csv
  7. +19
    -0
      createNodeAService.php
  8. +22
    -0
      createNodeAService.php.save
  9. +171
    -0
      css/index.css
  10. +86
    -0
      css/index_azurro.css
  11. BIN
      css/kaoscube_graffiti_digitalized.png
  12. BIN
      css/name_graffiti_digitalized.png
  13. BIN
      css/password_graffiti_digitalized.png
  14. +7
    -0
      devices.csv
  15. +103
    -0
      freedom.php
  16. +109
    -0
      index.php
  17. +239
    -0
      info.php
  18. +120
    -0
      info.php_old
  19. +155
    -0
      locale.yaml
  20. +189
    -0
      locale.yaml.save
  21. +188
    -0
      onion.php
  22. +20
    -0
      ssids.csv
  23. +1
    -0
      startserver.sh
  24. +45
    -0
      submittedNewEntry.php
  25. +1
    -0
      torState.csv
  26. +7
    -0
      updateInfo.php

+ 1178
- 0
Spyc.php
File diff suppressed because it is too large
View File


+ 110
- 0
changeKCPW.php View File

@ -0,0 +1,110 @@
<!doctype html>
<?php
$lang=$_GET['lang'];
if ( in_array ($lang, array('en-US'))){
$loc = "$lang".".utf8";
$loc1 = $lang;
}
else {
$loc = "de-DE";
$loc1 = "de-DE";
}
$color=$_GET['color'];
if (strlen($color) <= 1){
$color = "deeppink";
}
include "Spyc.php";
$localeYaml = Spyc::YAMLLoad('locale.yaml');
$domain = "messages";
setlocale(LC_MESSAGES, $loc);
setlocale(LC_ALL, $loc);
$results = putenv("LC_ALL=$loc");
$results = putenv("LC_MESSAGES=$loc");
$results = bindtextdomain($domain,"./locale");
?>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title><?php echo _($localeYaml['title'][$loc1])?></title>
<link rel="stylesheet" href="css/index.css">
</head>
<style>
body {
background: <?php echo _($color)?>;
}
input[type="text"] {
background: <?php echo _($color)?>;
}
input[type="text"]:focus {
background: <?php echo _($color)?>;
}
</style>
<body>
<center>
<div id="containerdiv">
<a href="/"><p id="linktext"><b><?php echo _($localeYaml['connect'][$loc1])?></b></p></a>
<a href="changeKCPW.php"><p id="linktext"><?php echo _($localeYaml['changePassword'][$loc1])?></p></a>
<a href="info.php"><p id="linktext"><?php echo _($localeYaml['info'][$loc1])?></p></a>
<a href="onion.php"><p id="linktext"><?php echo _($localeYaml['onionFeatures'][$loc1])?></p></a>
<a href="freedom.php"><p id="linktext"><?php echo _($localeYaml['freedom'][$loc1])?></p></a>
</div>
</center>
<form action="/changeKCPWaction.php" method="post" enctype="multipart/form-data">
<center>
<img style="width:50vw;"src="css/password_graffiti_digitalized.png">
<img style="width:50vw;"src="css/kaoscube_graffiti_digitalized.png">
<input type="text" id="rootPW" name="rootPW" placeholder="root PW"><br><br>
<input type="text" id="pwNewKc" name="pwNewKc" placeholder="NEW"><br><br>
<input type="submit" value="Change PW">
</center>
</form>
</br></br></br></br>
<footer>
<center>
<a href="mailto:contact@cannabinieri.de"><p id="linktext"><?php echo _($localeYaml['contact'][$loc1])?></p></a>
<p>© 2022 by Cannabinieri </p>
<address>
https://www.cannabinieri.de<br>
E-Mail: contact@cannabinieri.de<br><br>
</address>
</center>
</footer>
</center>
<center>
<div id="containerdiv2">
<a href="?color=deeppink"><p id="linktext"><b>pink</b></p></a>
<a href="?color=lightblue"><p id="linktext">azurro</p></a>
</div>
</center>
</body>
</html>

+ 2
- 0
changeKCPW.sh View File

@ -0,0 +1,2 @@

+ 19
- 0
changeKCPWaction.php View File

@ -0,0 +1,19 @@
<?php
$rootPW = $_POST["rootPW"];
$pwNewKc = $_POST["pwNewKc"];
$shellcommand = "echo $rootPW | sudo -S nmcli con modify kaoscube 802-11-wireless-security.psk $pwNewKc";
$commandAPdown = "echo $rootPW | sudo -S nmcli con down kaoscube";
$commandAPup = "echo $rootPW | sudo -S nmcli con up kaoscube";
$output = exec($shellcommand);
$output2 = exec($commandAPdown);
$output3 = exec($commandAPup);
echo _($output3);
echo _(" oi oi oi ");
?>

+ 14
- 0
connect2Network.php View File

@ -0,0 +1,14 @@
<?php
$name = $_POST["name"];
$password = $_POST["password"];
$rootPW = $_POST["rootPW"];
$shellcommand = "echo $rootPW | sudo -S nmcli dev wifi connect $name password $password ifname wlx00e0318cea7d";
$output = shell_exec($shellcommand);
echo _($output);
?>

+ 10
- 0
connections.csv View File

@ -0,0 +1,10 @@
NAME UUID TYPE DEVICE
kaoscube 8c19a78b-b803-4c7a-8970-7c7aa09c669b wifi wlan0
Faber Castell d0870963-4939-406c-9084-bcba2c86376a wifi wlx00e0318cea7d
FRITZ!Box 6430 Cable TL 2e60e1b4-7981-4091-854e-2e54f2991e97 wifi --
FRITZ!Box 6430 Cable TL 1 2e33ecdd-b76f-4b4f-8137-e65ff76cae61 wifi --
Ifupdown (wlx00c0caadd9ef) 80b6489a-5e68-1b86-d66f-a73bd4859ae5 ethernet --
NiDieuNiMaitre 263a7e79-75c8-43a8-aced-28206619522b wifi --
NiDieuNiMaitre 1 7285a381-8a74-42f3-9009-76e97965f0af wifi --
Wired connection 1 728a55a8-619a-31ea-9a4b-5267effe2f13 ethernet --
Wired connection 2 1a899f73-e669-37dd-be08-097bf01e01bc ethernet --

+ 19
- 0
createNodeAService.php View File

@ -0,0 +1,19 @@
<?php
$rootPW = $_POST["rootPW"];
$pwNewKc = $_POST["pwNewKc"];
$shellcommand = "echo $rootPW | sudo -S nmcli con modify kaoscube 802-11-wireless-security.psk $pwNewKc";
$commandAPdown = "echo $rootPW | sudo -S nmcli con down kaoscube";
$commandAPup = "echo $rootPW | sudo -S nmcli con up kaoscube";
$output = exec($shellcommand);
$output2 = exec($commandAPdown);
$output3 = exec($commandAPup);
echo _($output3);
echo _(" oi oi oi ");
?>

+ 22
- 0
createNodeAService.php.save View File

@ -0,0 +1,22 @@
<?php
$rootPW = $_POST["rootPW"];
$hsname = $_POST["hsname"];
$nodename = $_POST["nodename"];
$newTorState = "node"
$configureHiddenService = "echo $rootPW | sudo -S ";
$confiureNode = "echo $rootPW | sudo -S ";
$restartTor = "echo $rootPW | sudo -S ";
$replaceTorState = "echo $newTorState > torstate.csv"
$output = exec($shellcommand);
$output2 = exec($commandAPdown);
$output3 = exec($commandAPup);
echo _($output3);
echo _(" oi oi oi ");
?>

+ 171
- 0
css/index.css View File

@ -0,0 +1,171 @@
th, td, tr {
padding: 0.2rem;
}
th { font-size: 1rem; color: darkgray;}
th, td {
border: 1px solid gray;
}
tr {
border: 0px none transparent;
}
table {
border-collapse: collapse;
border: 0px none transparent;
}
thead { display:table-header-group; }
tfoot { display:table-footer-group; }
body {
#display: flex;
min-height: 500px;
justify-content: center;
align-items: center;
background: #f8a;
font-weight: 600;
font-size: 1.2em;
font-family: Verdana,"Rockwell",Helvetica,Serif;
}
input[type="submit"] {
display: block;
font-family: Verdana,"Rockwell",Helvetica,Serif;
font-size: 50px;
width: 220pt;
height: 220pt;
background: #fff;
padding: 10px;
border: 3px;
outline: 2px;
border-radius: 50%;
color: #171717;
transition: all 200ms;
cursor: pointer;
}
input[type="submit"]:focus {
background: transparent;
color: transparent;
border: none;
border-top: solid 3px #f8a;
border-left: solid 3px #fff;
animation: spin 700ms linear infinite;
}
@keyframes spin {
to {transform: rotate(360deg);}
}
a {
text-decoration: none;
color: black;
width: 220px;
height: 50px;
border: none;
outline: none;
color: #fff;
cursor: pointer;
position: relative;
z-index: 0;
border-radius: 10px;
border-style: solid;
}
a:before {
content: '';
background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
position: absolute;
top: -2px;
left:-2px;
background-size: 400%;
z-index: -1;
filter: blur(5px);
width: calc(100% + 4px);
height: calc(100% + 4px);
animation: glowing 20s linear infinite;
opacity: 0;
transition: opacity .3s ease-in-out;
border-radius: 10px;
}
a:active {
color: #000
}
a:active:after {
background: transparent;
}
a:hover:before {
opacity: 1;
}
.a:after {
z-index: -1;
content: '';
position: absolute;
width: 100%;
height: 100%;
background: #111;
left: 0;
top: 0;
border-radius: 10px;
}
@keyframes glowing {
0% { background-position: 0 0; }
50% { background-position: 400% 0; }
100% { background-position: 0 0; }
}
input[type="text"] {
background: lightblue;
border: 4pt;
border-color: white;
color: black;
border-style: solid;
height: 50pt;
width: 80vw;
font-size: 45pt;
}
input[type="text"]:focus {
background: #f8a;
border: 4pt;
border-color: white;
color: black;
border-style: solid;
height: 50pt;
width: 80vw;
font-size: 40pt;
outline-color: black;
}
#Connect {
display: flex;
justify-content: center;
align-items: center;
}
#containerdiv {
display: grid;
grid-template-columns: auto auto auto auto auto;
grid-column-gap: 4vw;
justify-content: center;
}
#containerdiv2 {
display: grid;
grid-template-columns: auto auto;
grid-column-gap: 4vw;
justify-content: center;
}

+ 86
- 0
css/index_azurro.css View File

@ -0,0 +1,86 @@
body {
#display: flex;
min-height: 500px;
justify-content: center;
align-items: center;
background: lightblue;
font-weight: 500;
font-size: 30pt;
font-family: Verdana,"Rockwell",Helvetica,Serif;
}
input[type="submit"] {
display: block;
font-family: Verdana,"Rockwell",Helvetica,Serif;
font-size: 50px;
width: 220pt;
height: 220pt;
background: #fff;
padding: 10px;
border: 3px;
outline: 2px;
border-radius: 50%;
color: #171717;
transition: all 200ms;
cursor: pointer;
}
input[type="submit"]:focus {
background: transparent;
color: transparent;
border: none;
border-top: solid 3px #f8a;
border-left: solid 3px #fff;
animation: spin 700ms linear infinite;
}
@keyframes spin {
to {transform: rotate(360deg);}
}
a {
text-decoration: none;
color: black;
}
input[type="text"] {
background: #f8a;
border: 4pt;
border-color: white;
color: black;
border-style: solid;
height: 50pt;
width: 80vw;
font-size: 55pt;
}
input[type="text"]:focus {
background: lightblue;
border: 4pt;
border-color: white;
color: black;
border-style: solid;
height: 50pt;
width: 80vw;
font-size: 45pt;
outline-color: black;
}
#Connect {
display: flex;
justify-content: center;
align-items: center;
}
#containerdiv {
display: grid;
grid-template-columns: auto auto auto auto;
grid-column-gap: 4vw;
}
#containerdiv2 {
display: grid;
grid-template-columns: auto auto;
grid-column-gap: 4vw;
}

BIN
css/kaoscube_graffiti_digitalized.png View File

Before After
Width: 1280  |  Height: 720  |  Size: 8.6 KiB

BIN
css/name_graffiti_digitalized.png View File

Before After
Width: 1834  |  Height: 1032  |  Size: 21 KiB

BIN
css/password_graffiti_digitalized.png View File

Before After
Width: 1834  |  Height: 1032  |  Size: 17 KiB

+ 7
- 0
devices.csv View File

@ -0,0 +1,7 @@
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected kaoscube
wlx00e0318cea7d wifi connected Faber Castell
p2p-dev-wlan0 wifi-p2p disconnected --
p2p-dev-wlx00e0318cea7d wifi-p2p disconnected --
eth0 ethernet unavailable --
lo loopback unmanaged --

+ 103
- 0
freedom.php View File

@ -0,0 +1,103 @@
<!doctype html>
<?php
$lang=$_GET['lang'];
if ( in_array ($lang, array('en-US'))){
$loc = "$lang".".utf8";
$loc1 = $lang;
}
else {
$loc = "de-DE";
$loc1 = "de-DE";
}
$color=$_GET['color'];
if (strlen($color) <= 1){
$color = "deeppink";
}
include "Spyc.php";
$localeYaml = Spyc::YAMLLoad('locale.yaml');
$domain = "messages";
setlocale(LC_MESSAGES, $loc);
setlocale(LC_ALL, $loc);
$results = putenv("LC_ALL=$loc");
$results = putenv("LC_MESSAGES=$loc");
$results = bindtextdomain($domain,"./locale");
?>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title><?php echo _($localeYaml['title'][$loc1])?></title>
<link rel="stylesheet" href="css/index.css">
</head>
<style>
body {
background: <?php echo _($color)?>;
}
input[type="text"] {
background: <?php echo _($color)?>;
}
input[type="text"]:focus {
background: <?php echo _($color)?>;
}
</style>
<body>
<center>
<div id="containerdiv">
<a href="/"><p id="linktext"><b><?php echo _($localeYaml['connect'][$loc1])?></b></p></a>
<a href="changeKCPW.php"><p id="linktext"><?php echo _($localeYaml['changePassword'][$loc1])?></p></a>
<a href="info.php"><p id="linktext"><?php echo _($localeYaml['info'][$loc1])?></p></a>
<a href="onion.php"><p id="linktext"><?php echo _($localeYaml['onionFeatures'][$loc1])?></p></a>
<a href="freedom.php"><p id="linktext"><?php echo _($localeYaml['freedom'][$loc1])?></p></a>
</div>
</center>
<br><br><br><br><br><br>
<center>
<?php echo _($localeYaml['freedom_p1'][$loc1])?>">
<?php echo _($localeYaml['freedom_p2'][$loc1])?>">
</center>
</form>
</br></br></br></br></br>
<footer>
<center>
<a href="mailto:contact@cannabinieri.de"><p id="linktext"><?php echo _($localeYaml['contact'][$loc1])?></p></a>
<p>© 2022 by Cannabinieri </p>
<address>
https://www.cannabinieri.de<br>
E-Mail: contact@cannabinieri.de<br><br>
</address>
</center>
</footer>
</center>
<center>
<div id="containerdiv2">
<a href="?color=deeppink"><p id="linktext"><b>pink</b></p></a>
<a href="?color=lightblue"><p id="linktext">azurro</p></a>
</div>
</center>
</body>
</html>

+ 109
- 0
index.php View File

@ -0,0 +1,109 @@
<!doctype html>
<?php
$lang=$_GET['lang'];
if ( in_array ($lang, array('en-US'))){
$loc = "$lang".".utf8";
$loc1 = $lang;
}
else {
$loc = "de-DE";
$loc1 = "de-DE";
}
$color=$_GET['color'];
if (strlen($color) <= 1){
$color = "deeppink";
}
include "Spyc.php";
$localeYaml = Spyc::YAMLLoad('locale.yaml');
$domain = "messages";
setlocale(LC_MESSAGES, $loc);
setlocale(LC_ALL, $loc);
$results = putenv("LC_ALL=$loc");
$results = putenv("LC_MESSAGES=$loc");
$results = bindtextdomain($domain,"./locale");
?>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title><?php echo _($localeYaml['title'][$loc1])?></title>
<link rel="stylesheet" href="css/index.css">
</head>
<style>
body {
background: <?php echo _($color)?>;
}
input[type="text"] {
background: <?php echo _($color)?>;
}
input[type="text"]:focus {
background: <?php echo _($color)?>;
}
</style>
<body>
<center>
<div id="containerdiv">
<a href="/"><p id="linktext"><b><?php echo _($localeYaml['connect'][$loc1])?></b></p></a>
<a href="changeKCPW.php"><p id="linktext"><?php echo _($localeYaml['changePassword'][$loc1])?></p></a>
<a href="info.php"><p id="linktext"><?php echo _($localeYaml['info'][$loc1])?></p></a>
<a href="onion.php"><p id="linktext"><?php echo _($localeYaml['onionFeatures'][$loc1])?></p></a>
<a href="freedom.php"><p id="linktext"><?php echo _($localeYaml['freedom'][$loc1])?></p></a>
</div>
</center>
</header>
<br><br><br><br><br><br>
<form action="/connect2Network.php" method="post" enctype="multipart/form-data">
<center>
<img style="width:20vw;" src="css/name_graffiti_digitalized.png"><br>
<input style="width:80vw;" type="text" id="name" name="name" placeholder="<?php echo _($localeYaml['placeholderName'][$loc1])?>"><br>
<img style="width:50vw;"src="css/password_graffiti_digitalized.png"><br>
<input style="width:80vw;" type="text" id="password" name="password" placeholder="<?php echo _($localeYaml['placeholderPassword'][$loc1])?>"><br><br>
<br><br>
<input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="<?php echo _($localeYaml['placeholderrootPW'][$loc1])?>"><br><br>
<br><br><br><br><br><br>
<input type="submit" value="<?php echo _($localeYaml['submitButton'][$loc1])?>">
</center>
</form>
</br></br></br></br></br>
<footer>
<center>
<a href="mailto:contact@cannabinieri.de"><p id="linktext"><?php echo _($localeYaml['contact'][$loc1])?></p></a>
<p>© 2022 by Cannabinieri </p>
<address>
https://www.cannabinieri.de<br>
E-Mail: contact@cannabinieri.de<br><br>
</address>
</center>
</footer>
</center>
<center>
<div id="containerdiv2">
<a href="/?color=deeppink"><p id="linktext"><b>pink</b></p></a>
<a href="/?color=lightblue"><p id="linktext">azurro</p></a>
</div>
</center>
</body>
</html>

+ 239
- 0
info.php View File

@ -0,0 +1,239 @@
<!doctype html>
<?php
$lang=$_GET['lang'];
if ( in_array ($lang, array('en-US'))){
$loc = "$lang".".utf8";
$loc1 = $lang;
}
else {
$loc = "de-DE";
$loc1 = "de-DE";
}
$color=$_GET['color'];
if (strlen($color) <= 1){
$color = "deeppink";
}
include "Spyc.php";
$localeYaml = Spyc::YAMLLoad('locale.yaml');
$domain = "messages";
setlocale(LC_MESSAGES, $loc);
setlocale(LC_ALL, $loc);
$results = putenv("LC_ALL=$loc");
$results = putenv("LC_MESSAGES=$loc");
$results = bindtextdomain($domain,"./locale");
?>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title><?php echo _($localeYaml['title'][$loc1])?></title>
<link rel="stylesheet" href="css/index.css">
</head>
<style>
body {
background: <?php echo _($color)?>;
}
input[type="text"] {
background: <?php echo _($color)?>;
}
input[type="text"]:focus {
background: <?php echo _($color)?>;
}
</style>
<body>
<center>
<div id="containerdiv">
<a href="/"><p id="linktext"><b><?php echo _($localeYaml['connect'][$loc1])?></b></p></a>
<a href="changeKCPW.php"><p id="linktext"><?php echo _($localeYaml['changePassword'][$loc1])?></p></a>
<a href="info.php"><p id="linktext"><?php echo _($localeYaml['info'][$loc1])?></p></a>
<a href="onion.php"><p id="linktext"><?php echo _($localeYaml['onionFeatures'][$loc1])?></p></a>
<a href="freedom.php"><p id="linktext"><?php echo _($localeYaml['freedom'][$loc1])?></p></a>
</div>
</center>
<?php
$shellcommand2 = "nmcli c show > connections.csv";
$output = shell_exec($shellcommand2);
?>
<br><br><br><br><br><br>
<center>
<?php echo _($localeYaml['connections'][$loc1])?>
<table id="demo"><tr>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
<?php
// (A) OPEN CSV FILE
$stream = fopen("connections.csv", "r");
// (B) EXTRACT ROWS & COLS
while (($row = fgets($stream)) !== false) {
echo "<tr>";
$col = preg_split( '/\s{2,}/', $row, -1, PREG_SPLIT_NO_EMPTY );
// var_dump( preg_split( '/\s{2,}/', $row ) );
$n = 0;
$id = 'oi';
foreach ($col as $c)
{
$n+=1;
echo "<td>$c</td>";
if ($n==1)
{
$id=substr($c, 0, -1);
}
}
echo "</tr>";
}
// (C) CLOSE CSV FILE
fclose($stream);
?></table>
</center>
</br></br></br></br>
<?php
$shellcommand3 = "nmcli dev status > devices.csv";
$output = shell_exec($shellcommand3);
?>
<br><br><br><br><br><br>
<center>
<?php echo _($localeYaml['devices'][$loc1])?>
<table id="demo"><tr>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
<?php
// (A) OPEN CSV FILE
$stream = fopen("devices.csv", "r");
// (B) EXTRACT ROWS & COLS
while (($row = fgets($stream)) !== false) {
echo "<tr>";
$col = preg_split( '/\s{2,}/', $row, -1, PREG_SPLIT_NO_EMPTY );
// var_dump( preg_split( '/\s{2,}/', $row ) );
$n = 0;
$id = 'oi';
foreach ($col as $c)
{
$n+=1;
echo "<td>$c</td>";
if ($n==1)
{
$id=substr($c, 0, -1);
}
}
echo "</tr>";
}
// (C) CLOSE CSV FILE
fclose($stream);
?></table>
</center>
</br></br></br></br>
<?php
$shellcommand2 = "nmcli -t --fields SSID,RATE,BARS,SECURITY dev wifi list > ssids.csv";
$output = shell_exec($shellcommand2);
?>
<center>
<?php echo _($localeYaml['ssids'][$loc1])?>
<table id="demo"><tr>
<th>SSID</th>
<th>RATE</th>
<th>BARS</th>
<th>SEC</th>
</tr>
<?php
// (A) OPEN CSV FILE
$stream = fopen("ssids.csv", "r");
// (B) EXTRACT ROWS & COLS
while (($row = fgets($stream)) !== false) {
echo "<tr>";
$col = preg_split( '/:/', $row, -1, PREG_SPLIT_NO_EMPTY );
// var_dump( preg_split( '/\s{2,}/', $row ) );
$n = 0;
$id = 'oi';
foreach ($col as $c)
{
$n+=1;
echo "<td>$c</td>";
if ($n==1)
{
$id=substr($c, 0, -1);
}
}
echo "</tr>";
}
// (C) CLOSE CSV FILE
fclose($stream);
?></table>
</center>
</br></br></br></br>
<footer>
<center>
<a href="mailto:contact@cannabinieri.de"><p id="linktext"><?php echo _($localeYaml['contact'][$loc1])?></p></a>
<p>© 2022 by Cannabinieri </p>
<address>
https://www.cannabinieri.de<br>
E-Mail: contact@cannabinieri.de<br><br>
</address>
</center>
</footer>
</center>
<center>
<div id="containerdiv2">
<a href="?color=deeppink"><p id="linktext"><b>pink</b></p></a>
<a href="?color=lightblue"><p id="linktext">azurro</p></a>
</div>
</center>
</body>
</html>

+ 120
- 0
info.php_old View File

@ -0,0 +1,120 @@
<!doctype html>
<?php
$lang=$_GET['lang'];
if ( in_array ($lang, array('en-US'))){
$loc = "$lang".".utf8";
$loc1 = $lang;
}
else {
$loc = "de-DE";
$loc1 = "de-DE";
}
include "Spyc.php";
$localeYaml = Spyc::YAMLLoad('locale.yaml');
$domain = "messages";
setlocale(LC_MESSAGES, $loc);
setlocale(LC_ALL, $loc);
$results = putenv("LC_ALL=$loc");
$results = putenv("LC_MESSAGES=$loc");
$results = bindtextdomain($domain,"./locale");
?>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title><?php echo _($localeYaml['title'][$loc1])?></title>
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<center>
<div id="containerdiv">
<a href="/"><p id="linktext"><b><?php echo _($localeYaml['connect'][$loc1])?></b></p></a>
<a href="changeKCPW.php"><p id="linktext"><?php echo _($localeYaml['changePassword'][$loc1])?></p></a>
<a href="info.php"><p id="linktext"><?php echo _($localeYaml['info'][$loc1])?></p></a>
<a href="onion.php"><p id="linktext"><?php echo _($localeYaml['onionFeatures'][$loc1])?></p></a>
</div>
</center>
<?php
$shellcommand2 = "nmcli c show > connections.csv";
$output = shell_exec($shellcommand2);
?>
<br><br><br><br><br><br>
<center>
<table id="demo"><tr>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
<?php
// (A) OPEN CSV FILE
$stream = fopen("connections.csv", "r");
// (B) EXTRACT ROWS & COLS
while (($row = fgets($stream)) !== false) {
echo "<tr>";
$col = preg_split( '/\s{2,}/', $row, -1, PREG_SPLIT_NO_EMPTY );
// var_dump( preg_split( '/\s{2,}/', $row ) );
$n = 0;
$id = 'oi';
foreach ($col as $c)
{
$n+=1;
echo "<td>$c</td>";
if ($n==1)
{
$id=substr($c, 0, -1);
}
}
echo "</tr>";
}
// (C) CLOSE CSV FILE
fclose($stream);
?></table>
</center>
</br></br></br></br>
<footer>
<center>
<a href="mailto:contact@cannabinieri.de"><p id="linktext"><?php echo _($localeYaml['contact'][$loc1])?></p></a>
<p>© 2022 by Cannabinieri </p>
<address>
https://www.cannabinieri.de<br>
E-Mail: contact@cannabinieri.de<br><br>
</address>
</center>
</footer>
</center>
<center>
<div id="containerdiv2">
<a href="connect.html"><p id="linktext"><b>pink</b></p></a>
<a href="connect_azurro.html"><p id="linktext">azurro</p></a>
</div>
</center>
</body>
</html>

+ 155
- 0
locale.yaml View File

@ -0,0 +1,155 @@
# Verpflegungsmehraufwandsformular wikimedia Deutschland
title:
de-DE: Cyber Conscious Production - Bewusste Produktion via Cyberspace
en-US: Cyber Conscious Production - Conscious Production via Cyberspace
inputSite_header:
de-DE: Erstelle einen ID Schlüssel für ein neues Objekt
en-US: Generate an ID key for a new object
inputSite_title_subtext_1:
de-DE: Die angehängten Bilder oder Dokumente werden auf der Seite angezeigt, die der BarCode darstellt
en-US: The uploaded Pictures or Documents will be displayed on the website, which is represented by the barcode.
newEntry:
de-DE: Neuer Eintrag
en-US: New Entry
existingEntries:
de-DE: gespeicherte Einträge
en-US: existing Entries
genetikx:
de-DE: Genetik
en-US: Genetics
time:
de-DE: Zeit
en-US: Time
locality:
de-DE: Ort
en-US: Locality
uploads:
de-DE: Fotos / Dokumente
en-US: Photos / documents
form_3_timeword_1:
de-DE: um
en-US: at
form_3_timeword_2:
de-DE: Uhr
en-US: o'clock
form_4_header:
de-DE: Abfahrtsort
en-US: Place of departure
form_4_placeholder_1:
de-DE: Wohnort
en-US: Home
form_4_placeholder_2:
de-DE: Arbeitsstätte
en-US: Office
form_4_placeholder_3:
de-DE: sonstiger Ort
en-US: other location
form_4_placeholder_4:
de-DE: Anschrift aufführen
en-US: other location
form_5_header:
de-DE: Zielland
en-US: Country of destination
form_5_question_description:
de-DE: Bei Reisen ins Ausland können andere Tagessätze gelten.
en-US: Different per diem rates may apply when traveling abroad.
form_6_header:
de-DE: Reiseende
en-US: Return date and time
form_6_timeword_1:
de-DE: um
en-US: at
form_6_timeword_2:
de-DE: Uhr
en-US: o'clock
form_7_header:
de-DE: Ort des Reiseendes
en-US: Destination at the end of your journey
form_7_placeholder_1:
de-DE: wie Abfahrtsort
en-US: same as the place of departure
form_7_placeholder_2:
de-DE: anderer Ort
en-US: other destination
form_7_placeholder_3:
de-DE: Anschrift aufführen
en-US: please enter the address
resultbox_1:
de-DE: 'voll:'
en-US: 'full:'
resultbox_1_question_description:
de-DE: Der volle Tagessatz wird für jeden Tag zwischen Anreisetag und Abreisetag angesetzt.
en-US: The full daily rate is applied for each day between the day of arrival and the day of departure.
resultbox_2:
de-DE: 'vermindert:'
en-US: 'reduced:'
resultbox_2_question_description:
de-DE: Der verminderte Tagessatz gilt für Anreisetag und Abreisetag.
en-US: The reduced daily rate applies to the day of arrival and departure.
resultbox_3:
de-DE: 'Pauschbetrag Übernachtung:'
en-US: 'lump sum overnight compensation:'
resultbox_3_question_description:
de-DE: 'Kann die reisende Person privat übernachten, besteht daraus ein Anspruch in Höhe dieses Pauschbetrages.'
en-US: 'If the person traveling can stay overnight privately, there is a claim from this in the amount of this lump sum.'
description_header:
de-DE: Aufstellung
en-US: Trip itinerary
description_1:
de-DE: Bitte trage jeden Reisetag ein.
en-US: Please enter the appropriate selection for each day of your journey.
description_2:
de-DE: Bitte setze für jeden Tag, an dem dir im Rahmen der Reisekostenübernahme die entsprechende Mahlzeit gestellt wurde (z.B. Ü/F (Übernachtung/Frühstück), HP (Halbpension), Buffet bei Konferenz) einen Haken an passender Stelle. Dein Anspruch für den jeweiligen Reisetag wird um den Anteil der jeweiligen Mahlzeit verringert. Konntest du privat übernachten, erhöht sich dein Anspruch für den Tag der jeweiligen privaten Übernachtung.
en-US: For every day of your journey, please select every meal that will already be reimbursed as part of your travel expenses (e.g. bed and breakfast, half board, conference buffet). Your reimbursement for each day of travel will be reduced depending on the meal. If you are staying somewhere free of charge (i.e. with friends or family), the amount of your reimbursement for that day will increase.
total:
de-DE: 'Summe:'
en-US: 'Total:'
print_button_bottom:
de-DE: Anlage Verpflegungsmehraufwand drucken
en-US: Print attachment for extra meal expenses
contact:
de-DE: Kontakt
en-US: Contact details
connect:
de-DE: KonnekKt
en-US: Connect
changePassword:
de-DE: Passwort ändern
en-US: Change Password
info:
de-DE: Info
en-US: Info
onionFeatures:
de-DE: Zwiebel
en-US: Onion
freedom:
de-DE: Freiheit
en-US: Freedom
placeholderName:
de-DE: Eingabe Netzwerkname
en-US: Enter Network Name
placeholderPassword:
de-DE: Eingabe Netzwerkpasswort
en-US: Enter Network Password
placeholderrootPW:
de-DE: Eingabe Root passwort
en-US: Enter Root Password
submitButton:
de-DE: Verbinden
en-US: Connect
connections:
de-DE: Verbindungen
en-US: Connections
devices:
de-DE: Verfügbare Interfaces
en-US: Available Interfaces
ssids:
de-DE: Netzwerke in der Nähe
en-US: Networks around
freedom_p1:
de-DE: Die Freiheit des Internets ist nicht selbstverständlich.<br><br>Sie erfordert, dass wir verstehen, was wir am Computer machen.<br><br>Wie versteht man am besten die Tomate, die man isst?<br>Indem man selbst mal Tomaten anbaut.<br><br>Der KaosCube lädt euch dazu ein, ihn zu verstehen.<br>Wenn ihr es schafft, irgendwas auf diesem ARM system zu bauen oder<br>auch nur zu installieren, dann stärkt ihr die open hardware Bewegung.<br>Denn die kleine platine des orange pis ist open hardware.<br>Dazu könnt ihr euren eigenen Hidden Service nutzen, um euch über das<br> Tor Netzwerk auf dem Cube einzuloggen.<br>Öffnet eine shell, installiert euch torsocks und ssh, anschließend<br>könnt ihr euch mit<br><br> connect2Kaos<br><br>verbinden.<br><br>Mit dem hiddenService kommt auch eure eigene Website im ZwiebelNetz.<br>Wenn ihr die htmls im Ordner <br><br> /ordner/ordner/oleola<br><br>ändert, dann ändert das die seite xyz.onion.<br><br>
en-US: Oi
freedom_p2:
de-DE: Der komplette code der Interface findet sich im Ordner interface im home ordner.<br>Dabei wurde ganz bewusst auf javascript verzichtet.<br><br>Es lohnt sich, Zeit im Terminal zu verbringen und das Betriebssystem zu erforschen<br>Denn dieser Router ist keine Blackbox.<br>Er ist ein richtiger kompletter Computer. <br>Und jeglichen Code kann man sich durchlesen.<br>Oder ihn verändern.<br><br>Warum zum Beispiel nicht einen eigenen Mailserver aufsetzen?<br>Oder einen eigenen Messenger Server, wie zum Beispiel Matrix oder Jami?<br>Oder statt Google oder Zoom zu nutzen, warum nicht ein eigener Video Konferenz Server?<br>Oder statt Youtube zu nutzen, warum nicht ein eigener Peertube server?<br>Oder statt Facebook oder Twitter, warum nicht eine eigene Mastodon oder Diaspora Instanz?<br><br>Oder eine eigene Cloud, zb auf basis von Nextcloud?<br><br>Die Liste geht noch ewig weiter.<br>Alles was ihr im internet nutzt, geht auch auf eurem eigenen Server.<br><br>Das ist manchmal einfacher, manchmal schwieriger zu realisieren.<br>Aber nichts davon müsst ihr selbst bauen.<br>Alles gibt es schon, und ihr müsst es vor allem einrichten und installieren.<br>Und das wird auch immer einfacher, je mehr Menschen das machen.<br>Oder zum beispiel auch mal nen euro bezahlen, hier und da, für coole Programme.<br>In allen fällen lernt man viel darüber, wer einem alles probleme macht, was eigentlich falsch läuft, und vor allem:<br><br>Was eigentlich die meisten Menschen für Probleme verursachen, wenn sie Programme im Internet nutzen, ohne zu verstehen, was sie tun.<br>
en-US: Oi

+ 189
- 0
locale.yaml.save View File

@ -0,0 +1,189 @@
# Verpflegungsmehraufwandsformular wikimedia Deutschland
title:
de-DE: Cyber Conscious Production - Bewusste Produktion via Cyberspace
en-US: Cyber Conscious Production - Conscious Production via Cyberspace
inputSite_header:
de-DE: Erstelle einen ID Schlüssel für ein neues Objekt
en-US: Generate an ID key for a new object
inputSite_title_subtext_1:
de-DE: Die angehängten Bilder oder Dokumente werden auf der Seite angezeigt, die der BarCode darstellt
en-US: The uploaded Pictures or Documents will be displayed on the website, which is represented by the barcode.
newEntry:
de-DE: Neuer Eintrag
en-US: New Entry
existingEntries:
de-DE: gespeicherte Einträge
en-US: existing Entries
genetikx:
de-DE: Genetik
en-US: Genetics
time:
de-DE: Zeit
en-US: Time
locality:
de-DE: Ort
en-US: Locality
uploads:
de-DE: Fotos / Dokumente
en-US: Photos / documents
form_3_timeword_1:
de-DE: um
en-US: at
form_3_timeword_2:
de-DE: Uhr
en-US: o'clock
form_4_header:
de-DE: Abfahrtsort
en-US: Place of departure
form_4_placeholder_1:
de-DE: Wohnort
en-US: Home
form_4_placeholder_2:
de-DE: Arbeitsstätte
en-US: Office
form_4_placeholder_3:
de-DE: sonstiger Ort
en-US: other location
form_4_placeholder_4:
de-DE: Anschrift aufführen
en-US: other location
form_5_header:
de-DE: Zielland
en-US: Country of destination
form_5_question_description:
de-DE: Bei Reisen ins Ausland können andere Tagessätze gelten.
en-US: Different per diem rates may apply when traveling abroad.
form_6_header:
de-DE: Reiseende
en-US: Return date and time
form_6_timeword_1:
de-DE: um
en-US: at
form_6_timeword_2:
de-DE: Uhr
en-US: o'clock
form_7_header:
de-DE: Ort des Reiseendes
en-US: Destination at the end of your journey
form_7_placeholder_1:
de-DE: wie Abfahrtsort
en-US: same as the place of departure
form_7_placeholder_2:
de-DE: anderer Ort
en-US: other destination
form_7_placeholder_3:
de-DE: Anschrift aufführen
en-US: please enter the address
resultbox_1:
de-DE: 'voll:'
en-US: 'full:'
resultbox_1_question_description:
de-DE: Der volle Tagessatz wird für jeden Tag zwischen Anreisetag und Abreisetag angesetzt.
en-US: The full daily rate is applied for each day between the day of arrival and the day of departure.
resultbox_2:
de-DE: 'vermindert:'
en-US: 'reduced:'
resultbox_2_question_description:
de-DE: Der verminderte Tagessatz gilt für Anreisetag und Abreisetag.
en-US: The reduced daily rate applies to the day of arrival and departure.
resultbox_3:
de-DE: 'Pauschbetrag Übernachtung:'
en-US: 'lump sum overnight compensation:'
resultbox_3_question_description:
de-DE: 'Kann die reisende Person privat übernachten, besteht daraus ein Anspruch in Höhe dieses Pauschbetrages.'
en-US: 'If the person traveling can stay overnight privately, there is a claim from this in the amount of this lump sum.'
description_header:
de-DE: Aufstellung
en-US: Trip itinerary
description_1:
de-DE: Bitte trage jeden Reisetag ein.
en-US: Please enter the appropriate selection for each day of your journey.
description_2:
de-DE: Bitte setze für jeden Tag, an dem dir im Rahmen der Reisekostenübernahme die entsprechende Mahlzeit gestellt wurde (z.B. Ü/F (Übernachtung/Frühstück), HP (Halbpension), Buffet bei Konferenz) einen Haken an passender Stelle. Dein Anspruch für den jeweiligen Reisetag wird um den Anteil der jeweiligen Mahlzeit verringert. Konntest du privat übernachten, erhöht sich dein Anspruch für den Tag der jeweiligen privaten Übernachtung.
en-US: For every day of your journey, please select every meal that will already be reimbursed as part of your travel expenses (e.g. bed and breakfast, half board, conference buffet). Your reimbursement for each day of travel will be reduced depending on the meal. If you are staying somewhere free of charge (i.e. with friends or family), the amount of your reimbursement for that day will increase.
total:
de-DE: 'Summe:'
en-US: 'Total:'
print_button_bottom:
de-DE: Anlage Verpflegungsmehraufwand drucken
en-US: Print attachment for extra meal expenses
contact:
de-DE: Kontakt
en-US: Contact details
connect:
de-DE: KonnekKt
en-US: Connect
changePassword:
de-DE: Passwort ändern
en-US: Change Password
info:
de-DE: Info
en-US: Info
onionFeatures:
de-DE: Zwiebel
en-US: Onion
freedom:
de-DE: Freiheit
en-US: Freedom
placeholderName:
de-DE: Eingabe Netzwerkname
en-US: Enter Network Name
placeholderPassword:
de-DE: Eingabe Netzwerkpasswort
en-US: Enter Network Password
placeholderrootPW:
de-DE: Eingabe Root passwort
en-US: Enter Root Password
submitButton:
de-DE: Verbinden
en-US: Connect
connections:
de-DE: Verbindungen
en-US: Connections
devices:
de-DE: Verfügbare Interfaces
en-US: Available Interfaces
ssids:
de-DE: Netzwerke in der Nähe
en-US: Networks around
freedom_p1:
de-DE: Die Freiheit des Internets ist nicht selbstverständlich.<br><br>
Sie erfordert, dass wir verstehen, was wir am Computer machen.<br><br>
Wie versteht man am besten die Tomate, die man isst?<br>
Indem man selbst mal Tomaten anbaut.<br><br>
Der KaosCube lädt euch dazu ein, ihn zu verstehen.<br>
Wenn ihr es schafft, irgendwas auf diesem ARM system zu bauen oder<br>
auch nur zu installieren, dann stärkt ihr die open hardware Bewegung.<br>
Denn die kleine platine des orange pis ist open hardware.<br>
Dazu könnt ihr euren eigenen Hidden Service nutzen, um euch über das<br>
Tor Netzwerk auf dem Cube einzuloggen.<br>
Öffnet eine shell, installiert euch torsocks und ssh, anschließend<br>
könnt ihr euch mit<br><br>
connect2Kaos<br><br>
verbinden.<br><br>
Mit dem hiddenService kommt auch eure eigene Website im ZwiebelNetz.<br>
Wenn ihr die htmls im Ordner <br><br>
/ordner/ordner/oleola<br><br>
ändert, dann ändert das die seite xyz.onion.<br><br>
Der komplette code der Interface findet sich im Ordner interface im home ordner.<br>Dabei wurde ganz bewusst auf javascript verzichtet.<br><br>

+ 188
- 0
onion.php View File

@ -0,0 +1,188 @@
<!doctype html>
<?php
$lang=$_GET['lang'];
if ( in_array ($lang, array('en-US'))){
$loc = "$lang".".utf8";
$loc1 = $lang;
}
else {
$loc = "de-DE";
$loc1 = "de-DE";
}
$color=$_GET['color'];
if (strlen($color) <= 1){
$color = "deeppink";
}
include "Spyc.php";
$localeYaml = Spyc::YAMLLoad('locale.yaml');
$domain = "messages";
setlocale(LC_MESSAGES, $loc);
setlocale(LC_ALL, $loc);
$results = putenv("LC_ALL=$loc");
$results = putenv("LC_MESSAGES=$loc");
$results = bindtextdomain($domain,"./locale");
?>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title><?php echo _($localeYaml['title'][$loc1])?></title>
<link rel="stylesheet" href="css/index.css">
</head>
<style>
body {
background: <?php echo _($color)?>;
}
input[type="text"] {
background: <?php echo _($color)?>;
}
input[type="text"]:focus {
background: <?php echo _($color)?>;
}
</style>
<body>
<center>
<div id="containerdiv">
<a href="/"><p id="linktext"><b><?php echo _($localeYaml['connect'][$loc1])?></b></p></a>
<a href="changeKCPW.php"><p id="linktext"><?php echo _($localeYaml['changePassword'][$loc1])?></p></a>
<a href="info.php"><p id="linktext"><?php echo _($localeYaml['info'][$loc1])?></p></a>
<a href="onion.php"><p id="linktext"><?php echo _($localeYaml['onionFeatures'][$loc1])?></p></a>
<a href="freedom.php"><p id="linktext"><?php echo _($localeYaml['freedom'][$loc1])?></p></a>
</div>
</center>
<?php
$state = "";
$txt_file = fopen('torState.csv','r');
while ($line = fgets($txt_file)) {
$state = $line;
$state = str_replace(array("\r", "\n"), '',$state);
}
fclose($txt_file);
?>
<?php
if(strcmp($state,'new')==0){
echo <<<GFG
<br><br><br><br><br><br>
<center>
<p> get your first hidden service running </p>
</center>
<br><br><br><br><br><br>
<form action="/createNodeAService.php" method="post" enctype="multipart/form-data">
<center>
<p> Insert the name of your hiddenservice Project (internal name) </p>
<input style="width:80vw;" type="text" id="hsname" name="hsname" placeholder="name"><br><br>
<br><br><br><br><br><br>
<p> Insert the name of your node publicly visible on the tor network </p>
<input style="width:80vw;" type="text" id="nodename" name="nodename" placeholder="name"><br><br>
<br><br><br><br><br><br>
<p> Insert your root password </p>
<input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="root pw"><br><br>
<br><br><br><br><br><br>
<input type="submit" value="create">
</center>
</form>
</br></br></br></br></br>
GFG;
}elseif(strcmp($state,'node')==0){
echo <<<GFG
<p> you have a node running</p>
<br><br><br><br><br><br>
<form action="/change2bridge.php" method="post" enctype="multipart/form-data">
<center>
<p> give your bridge a name </p>
<input style="width:80vw;" type="text" id="password" name="password" placeholder="nickname"><br><br>
<br><br>
<input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="root passwort"><br><br>
<br><br><br><br><br><br>
<input type="submit" value="become bridge">
</center>
</form>
</br></br></br></br></br>
GFG;
}elseif(strcmp($state,'bridge')==0){
echo <<<GFG
<center>
<p> you have a Bridge running </p><br>
</center>
<br><br><br><br><br><br>
<form action="/change2node.php" method="post" enctype="multipart/form-data">
<center>
<p> type in the nickname of your middle node </p>
<input style="width:80vw;" type="text" id="password" name="password" placeholder="name middle node"><br><br>
<br><br>
<input style="width:80vw;" type="text" id="rootPW" name="rootPW" placeholder="root passwort"><br><br>
<br><br><br><br><br><br>
<input type="submit" value="become node">
</center>
</form>
</br></br></br></br></br>
GFG;
}
?>
<footer>
<center>
<a href="mailto:contact@cannabinieri.de"><p id="linktext"><?php echo _($localeYaml['contact'][$loc1])?></p></a>
<p>© 2022 by Cannabinieri </p>
<address>
https://www.cannabinieri.de<br>
E-Mail: contact@cannabinieri.de<br><br>
</address>
</center>
</footer>
</center>
<center>
<div id="containerdiv2">
<a href="?color=deeppink"><p id="linktext"><b>pink</b></p></a>
<a href="?color=lightblue"><p id="linktext">azurro</p></a>
</div>
</center>
</body>
</html>

+ 20
- 0
ssids.csv View File

@ -0,0 +1,20 @@
KaosCube:0 Mbit/s: :WPA1 WPA2
KaosCube:65 Mbit/s:****:WPA1 WPA2
Faber Castell:540 Mbit/s:*** :WPA2
FRITZ!Box 7560 XJ:195 Mbit/s:*** :WPA2
MagentaWLAN-G3JX:540 Mbit/s:** :WPA2 WPA3
o2-WLAN77:130 Mbit/s:** :WPA2
FRITZ!Box 7530 SC:130 Mbit/s:** :WPA2
WLAN-817540:540 Mbit/s:** :WPA2
FaFoMasch:540 Mbit/s:** :WPA2
FROST:195 Mbit/s:** :WPA2
o2-WLAN72:130 Mbit/s:** :WPA2
FRITZ!Box 7412:130 Mbit/s:** :WPA2
WLAN-175967:540 Mbit/s:** :WPA2
FRITZ!Box 7530 Sue:270 Mbit/s:** :WPA2
Vodafone-674242:270 Mbit/s:* :WPA2
o2-WLAN76:130 Mbit/s:* :WPA2
FRITZ!Box 7490:195 Mbit/s:* :WPA2
Jupiter:195 Mbit/s:* :WPA2
o2-WLAN13:130 Mbit/s:* :WPA2

+ 1
- 0
startserver.sh View File

@ -0,0 +1 @@
sudo php -S 0.0.0.0:666

+ 45
- 0
submittedNewEntry.php View File

@ -0,0 +1,45 @@
<?php
$domain = 'kaoscube.org';
$genetikx = $_POST["genetikx"];
$time = $_POST["time"];
$locality = $_POST["locality"];
# $target_file = $target_dir . basename($_FILES["file"]["name"]);
$target_dir = "uploads/";
$randNum = abs(intval(shell_exec('bash genRandNum.sh')));
echo $randNum;
$target_file = $target_dir . $randNum;
move_uploaded_file($_FILES["file"]["tmp_name"], $target_file);
$myfile = fopen("entries.csv", "a") or die("Unable to open file!");
fwrite($myfile, "$randNum , $genetikx , $time , $locality , $target_file \n");
fclose($myfile);
$shellcommand = "bash createQRcode.sh $domain/$randNum barcodes/$randNum.png";
$output = shell_exec($shellcommand);
?>
<hmtl>
<body>
</br></br></br>
<center>
<p style="font-size:50vh;">
Oi
</p>
</center>
</br></br></br>
</body>
</html>

+ 1
- 0
torState.csv View File

@ -0,0 +1 @@
new

+ 7
- 0
updateInfo.php View File

@ -0,0 +1,7 @@
<?php
$shellcommand2 = "nmcli c show > connections.csv"
$output = shell_exec($shellcommand2);
?>

Loading…
Cancel
Save