/media/sda-magnetic/david/Dok-15-2023-11-27/informatik/www-intel-compute-stick-2022-06-13/051/output02.txt


david@intel-compute-stick:~$ mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 324
Server version: 10.5.12-MariaDB-0+deb11u1 Debian 11

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE test051
    -> ;
Query OK, 1 row affected (0.029 sec)

MariaDB [(none)]> USE test051;
Database changed
MariaDB [test051]> CREATE TABLE abc (name1 VARCHAR (32), name2 VARCHAR (32));
Query OK, 0 rows affected (0.070 sec)

MariaDB [test051]> CREATE TABLE def (name3 VARCHAR (32), name4 VARCHAR (32));
Query OK, 0 rows affected (0.077 sec)

MariaDB [test051]> INSERT INTO abc VALUES ("001", "001");
Query OK, 1 row affected (0.029 sec)

MariaDB [test051]> INSERT INTO abc (name1, name2) VALUES ("001", "002");
Query OK, 1 row affected (0.035 sec)

MariaDB [test051]> INSERT INTO abc (name2, name1) VALUES ("001", "002");
Query OK, 1 row affected (0.032 sec)

MariaDB [test051]> INSERT INTO abc (name1, name2) VALUES ("002", "002");
Query OK, 1 row affected (0.027 sec)

MariaDB [test051]> INSERT INTO def (name3, name4) VALUES ("001", "001");
Query OK, 1 row affected (0.029 sec)

MariaDB [test051]> INSERT INTO def (name3, name4) VALUES ("001", "002");
Query OK, 1 row affected (0.029 sec)

MariaDB [test051]> INSERT INTO def (name3, name4) VALUES ("002", "002"); 
Query OK, 1 row affected (0.028 sec)

MariaDB [test051]> INSERT INTO def (name3, name4) VALUES ("abc", "def");
Query OK, 1 row affected (0.030 sec)

MariaDB [test051]> SELECT * FROM abc;
+-------+-------+
| name1 | name2 |
+-------+-------+
| 001   | 001   |
| 001   | 002   |
| 002   | 001   |
| 002   | 002   |
+-------+-------+
4 rows in set (0.001 sec)

MariaDB [test051]> SELECT * FROM def;
+-------+-------+
| name3 | name4 |
+-------+-------+
| 001   | 001   |
| 001   | 002   |
| 002   | 002   |
| abc   | def   |
+-------+-------+
4 rows in set (0.001 sec)

MariaDB [test051]> SELECT * FROM abc JOIN def;
+-------+-------+-------+-------+
| name1 | name2 | name3 | name4 |
+-------+-------+-------+-------+
| 001   | 001   | 001   | 001   |
| 001   | 002   | 001   | 001   |
| 002   | 001   | 001   | 001   |
| 002   | 002   | 001   | 001   |
| 001   | 001   | 001   | 002   |
| 001   | 002   | 001   | 002   |
| 002   | 001   | 001   | 002   |
| 002   | 002   | 001   | 002   |
| 001   | 001   | 002   | 002   |
| 001   | 002   | 002   | 002   |
| 002   | 001   | 002   | 002   |
| 002   | 002   | 002   | 002   |
| 001   | 001   | abc   | def   |
| 001   | 002   | abc   | def   |
| 002   | 001   | abc   | def   |
| 002   | 002   | abc   | def   |
+-------+-------+-------+-------+
16 rows in set (0.001 sec)

MariaDB [test051]> SELECT * FROM abc LEFT JOIN def ON abc.name1 = def.name3;
+-------+-------+-------+-------+
| name1 | name2 | name3 | name4 |
+-------+-------+-------+-------+
| 001   | 001   | 001   | 001   |
| 001   | 002   | 001   | 001   |
| 001   | 001   | 001   | 002   |
| 001   | 002   | 001   | 002   |
| 002   | 001   | 002   | 002   |
| 002   | 002   | 002   | 002   |
+-------+-------+-------+-------+
6 rows in set (0.002 sec)

MariaDB [test051]> SELECT * FROM abc RIGHT JOIN def ON abc.name2 = def.name4;
+-------+-------+-------+-------+
| name1 | name2 | name3 | name4 |
+-------+-------+-------+-------+
| 001   | 001   | 001   | 001   |
| 001   | 002   | 001   | 002   |
| 001   | 002   | 002   | 002   |
| 002   | 001   | 001   | 001   |
| 002   | 002   | 001   | 002   |
| 002   | 002   | 002   | 002   |
| NULL  | NULL  | abc   | def   |
+-------+-------+-------+-------+
7 rows in set (0.002 sec)

MariaDB [test051]> QUIT
Bye
david@intel-compute-stick:~$ cd /var/www/html/0
001/  004/  007/  010/  013/  015/  018/  021/  024/  027/  031/  034/  037/  040/  043/  046/  049/
002/  005/  008/  011/  014/  016/  019/  022/  025/  028/  032/  035/  038/  041/  044/  047/  050/
003/  006/  009/  012/  014a/ 017/  020/  023/  026/  030/  033/  036/  039/  042/  045/  048/  051/
david@intel-compute-stick:~$ cd /var/www/html/0
001/  004/  007/  010/  013/  015/  018/  021/  024/  027/  031/  034/  037/  040/  043/  046/  049/
002/  005/  008/  011/  014/  016/  019/  022/  025/  028/  032/  035/  038/  041/  044/  047/  050/
003/  006/  009/  012/  014a/ 017/  020/  023/  026/  030/  033/  036/  039/  042/  045/  048/  051/
david@intel-compute-stick:~$ cd /var/www/html/051/
david@intel-compute-stick:/var/www/html/051$ php database.php > output01.txt
david@intel-compute-stick:/var/www/html/051$ telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
POST /051/form1.php HTTP/1.1
host: localhost
Cookie: Cookie51a=HALLO_DIES_IST_COOKIE_51a
Content-Type: application/x-www-form-urlencoded
Content-Length: 32

password1=HALLO_HIER_PASSWORT_51
HTTP/1.1 200 OK
Date: Wed, 25 May 2022 14:37:36 GMT
Server: Apache/2.4.52 (Debian)
Set-Cookie: PHPSESSID=h94d0r5568vsbig97u6bs7hlf3; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: Cookie51=DIES_IST_COOKIE_51; expires=Wed, 25-May-2022 15:37:37 GMT; Max-Age=3600
Vary: Accept-Encoding
Content-Length: 224
Content-Type: text/html; charset=UTF-8


<form method="POST" action="./form1.php">
<input type="password" name="password1"></input>
<input type="submit"></input>
</form>

h94d0r5568vsbig97u6bs7hlf3<br>
HALLO_HIER_PASSWORT_51<br>
HALLO_DIES_IST_COOKIE_51a<br>
<br>

Connection closed by foreign host.
david@intel-compute-stick:/var/www/html/051$