Re: Das neue Auswendig lernen und die neuen UEbungen -

ich mache jetzt Aufgaben (1.) MySQL und PHP

Ich mache nachher Tiefen und Breitensuche per hand

<?php
session_start ();
?>

<?php

session_destroy ();
?>

<?php
session_start ();
?>

<form method="POST" action="./form20240527.php">
<input type="text" name="form20240527a"></input>
<input type="submit">
</form>

<?php

session_destroy ();
?>

<?php
session_start ();
?>

<form method="POST" action="./form20240527.php">
<input type="text" name="form20240527a"></input>
<input type="submit">
</form>

<?php
echo session_id () . "<br>n";

setcookie ("form20240527b", "Die ist das erste Keks", time () + 1200);

echo htmlentities (\$_POST ["form20240527a"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form20240527b"]) . "<br>n";
echo htmlentities (\$_COOKIE ["form20240527c"]) . "<br>n";

session_destroy ();
?>

Image 1tQDbwOnOXiNK-lzgi-G-WIsABYPZBzMd

POST http://localhost/mysql20240217/20240527/form20240527.php HTTP/1.1
host: localhost
Cookie: form20240527c=Ich bin 2. Keks
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

form20240527a=Ich bin das Datum

Trying ::1...
Connected to localhost.
Escape character is '\^]'.
HTTP/1.1 200 OK
Date: Mon, 27 May 2024 08:33:55 GMT
Server: Apache/2.4.59 (Debian)
Set-Cookie: PHPSESSID=p8h6rv967omk2fjhl8b68qcqgn; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: form20240527b=Die%20ist%20das%20erste%20Keks; expires=Mon, 27 May 2024 08:53:55 GMT; Max-Age=1200
Vary: Accept-Encoding
Content-Length: 208
Content-Type: text/html; charset=UTF-8

<form method="POST" action="./form20240527.php">
<input type="text" name="form20240527a"></input>
<input type="submit">
</form>

p8h6rv967omk2fjhl8b68qcqgn<br>
Ich bin das Datum<br>
<br>
Ich bin 2. Keks<br>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE m20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE m20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "DROP DATABASE m20240527" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE m20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE m20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); CREATE TABLE b (y1 INTEGER, y2 INTEGER); ";
\$db->query (\$sql);

\$sql  = "INSERT INTO a (x1, x2) VALUES (0, 0); ";
\$sql .= "INSERT INTO a (x1, x2) VALUES (0, 1); ";
\$sql .= "INSERT INTO a (x1, x2) VALUES (1, 0); ";
\$sql .= "INSERT INTO a (x1, x2) VALUES (1, 1); ";
\$sql .= "INSERT INTO a (x1, x2) VALUES (2, 7); ";
\$sql .= "INSERT INTO b (y1, y2) VALUES (0, 1); ";
\$sql .= "INSERT INTO b (y1, y2) VALUES (1, 0); ";
\$sql .= "INSERT INTO b (y1, y2) VALUES (2, 7); ";
\$db->query (\$sql);

\$sql = "DROP DATABASE m20240527" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE m20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE m20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x1 INTEGER, x2 INTEGER); CREATE TABLE b (y1 INTEGER, y2 INTEGER); ";
\$db->query (\$sql);

\$sql  = "INSERT INTO a (x1, x2) VALUES (0, 0); ";
\$sql .= "INSERT INTO a (x1, x2) VALUES (0, 1); ";
\$sql .= "INSERT INTO a (x1, x2) VALUES (1, 0); ";
\$sql .= "INSERT INTO a (x1, x2) VALUES (1, 1); ";
\$sql .= "INSERT INTO a (x1, x2) VALUES (2, 7); ";
\$sql .= "INSERT INTO b (y1, y2) VALUES (0, 1); ";
\$sql .= "INSERT INTO b (y1, y2) VALUES (1, 0); ";
\$sql .= "INSERT INTO b (y1, y2) VALUES (2, 7); ";
\$db->query (\$sql);

\$sql = "SELECT x1, x2 FROM a; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . "; ";
echo "<br>n";

\$sql = "SELECT y1, y2 FROM b; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . "; ";
echo "<br>n";

\$sql = "SELECT x1, x2, y1, y2 FROM a INNER JOIN b ON a.x1 = b.y1; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", " . \$row [1] . ". " . \$row [2] . ", " . \$row [3] . "; ";
echo "<br>n";

\$sql = "DROP DATABASE m20240527" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

0, 0; 0, 1; 1, 0; 1, 1; 2, 7; <br>
0, 1; 1, 0; 2, 7; <br>
0, 0. 0, 1; 0, 1. 0, 1; 1, 0. 1, 0; 1, 1. 1, 0; 2, 7. 2, 7; <br>

<?php

?>

Was ich heute zu den UEbungen noch mache - das ist heute Primiaere - zwei Hackattacken auf das eigene System. Geht zu den UEbungen. Aber heute ist Primiere

Weil der VSP fragte, ob ich hacken kann

Ich kann

ping3

ausfuehren. Das versagt beim eigenen System. Weil, das ist ein DoS Attacke - aber die Systeme sind heutzutage so, dass sie die nicht ausfuehren

Dann kann XSS Attacken machen. Kann ich. ich habe einen Kurs, an der Fernuni hagen, PHP, da steht XSS Attacke drin

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$db = "CREATE DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER); ";
\$db->query (\$sql);

\$sql = "DROP DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER); ";
\$db->query (\$sql);

for (\$i = 0;  \$i < 24;  \$i++) {
    \$sql  = "INSERT INTO a (x) VALUES (" . rand () % 32 . "); ";
    \$sql .= "INSERT INTO b (x) VALUES (" . rand () % 64 . "); ";
    \$sql .= "INSERT INTO c (x) VALUES (" . rand () % 128 . "); ";
    \$db->query (\$sql);
}

\$sql = "DROP DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER); ";
\$db->query (\$sql);

for (\$i = 0;  \$i < 24;  \$i++) {
    \$sql  = "INSERT INTO a (x) VALUES (" . rand () % 32 . "); ";
    \$sql .= "INSERT INTO b (x) VALUES (" . rand () % 64 . "); ";
    \$sql .= "INSERT INTO c (x) VALUES (" . rand () % 128 . "); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x ORDER BY x; ";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x ORDER BY x; ";
\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x ORDER BY x; ";
\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x ORDER BY x; "

\$sql = "DROP DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER); ";
\$db->query (\$sql);

for (\$i = 0;  \$i < 24;  \$i++) {
    \$sql  = "INSERT INTO a (x) VALUES (" . rand () % 32 . "); ";
    \$sql .= "INSERT INTO b (x) VALUES (" . rand () % 64 . "); ";
    \$sql .= "INSERT INTO c (x) VALUES (" . rand () % 128 . "); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x ORDER BY x; ";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x ORDER BY x; ";
\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x ORDER BY x; ";
\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x ORDER BY x; "
\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x ORDER BY x; ";
\$sql = "SELECT x FROM (SEELCT x FROM b INTERSECT SELECT x FROM c) x ORDER BY x; ";
\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x; ";

\$sql = "DROP DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER); ";
\$db->query (\$sql);

for (\$i = 0;  \$i < 24;  \$i++) {
    \$sql  = "INSERT INTO a (x) VALUES (" . rand () % 32 . "); ";
    \$sql .= "INSERT INTO b (x) VALUES (" . rand () % 64 . "); ";
    \$sql .= "INSERT INTO c (x) VALUES (" . rand () % 128 . "); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x ORDER BY x; ";
\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x ORDER BY x; ";
\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x ORDER BY x; ";
\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x ORDER BY x; "
\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x ORDER BY x; ";
\$sql = "SELECT x FROM (SEELCT x FROM b INTERSECT SELECT x FROM c) x ORDER BY x; ";
\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x; ";
\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x ORDER BY x; ";
\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x; ";
\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x ORDER BY x; ";
\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x ORDER BY x; ";

\$sql = "DROP DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

<?php
session_start ();

include ("/home/david/mysqldata.php");

\$db = new PDO ("mysql: host=localhost", \$MYSQL_USER, \$MYSQL_PASSWORD);

\$sql = "CREATE DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "USE q20240527" . session_id () . "; ";
\$db->query (\$sql);

\$sql = "CREATE TABLE a (x INTEGER); CREATE TABLE b (x INTEGER); CREATE TABLE c (x INTEGER); ";
\$db->query (\$sql);

for (\$i = 0;  \$i < 24;  \$i++) {
    \$sql  = "INSERT INTO a (x) VALUES (" . rand () % 32 . "); ";
    \$sql .= "INSERT INTO b (x) VALUES (" . rand () % 64 . "); ";
    \$sql .= "INSERT INTO c (x) VALUES (" . rand () % 128 . "); ";
    \$db->query (\$sql);
}

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM b) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM c
    ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM b INTERSECT SELECT x FROM c) x
    ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM b UNION SELECT x FROM c) x
                INTERSECT
            SELECT x FROM a
    ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "SELECT x FROM (
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM b) x
                UNION
            SELECT x FROM (SELECT x FROM a INTERSECT SELECT x FROM c) x
    ) x ORDER BY x; ";
\$stmt = \$db->query (\$sql);
while (\$row = \$stmt -> fetch ())
    echo \$row [0] . ", ";
echo "<br>n";

\$sql = "DROP DATABASE q20240527" . session_id () . "; ";
\$db->query (\$sql);

session_destroy ();
?>

0, 1, 2, 3, 5, 7, 8, 10, 12, 14, 15, 16, 17, 18, 20, 23, 24, 26, 30, 32, 34, 35, 36, 37, 39, 42, 50, 55, 56, <br>
0, 1, 2, 3, 4, 5, 8, 9, 10, 12, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 26, 30, 31, 35, 44, 51, 58, 69, 71, 91, 100, 102, 104, 109, 112, 114, 126, <br>
2, 3, 4, 7, 9, 10, 12, 14, 18, 19, 22, 23, 24, 26, 31, 32, 34, 35, 36, 37, 39, 42, 44, 50, 51, 55, 56, 58, 69, 71, 91, 100, 102, 104, 109, 112, 114, 126, <br>
2, 10, 12, 14, 18, 23, 24, 26, <br>
14, <br>
3, 14, 35, <br>
3, 14, 35, <br>
3, 14, 35, <br>
3, 4, 9, 14, 19, 22, 31, 35, 44, 51, 58, 69, 71, 91, 100, 102, 104, 109, 112, 114, 126, <br>
2, 3, 10, 12, 14, 18, 23, 24, 26, 35, <br>
2, 10, 12, 14, 18, 23, 24, 26, <br>
2, 10, 12, 14, 18, 23, 24, 26, <br>

#!/bin/bash

\$vorname="David"
\$nachname="Vajda"

if [[ "\$1" == "\$vorname" \&amp;\&amp; "\$2" == "\$nachname" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "\$vorname \$nachname" \&amp;\&amp; -z "\$2" ]]
then

#!/bin/bash

# https://phpbb3.ituenix.de/viewtopic.php?p=2483\&amp;sid=352a143c22185737e70297dfb05df717#p2483

\$vorname="David"
\$nachname="Vajda"

if [[ "\$1" == "\$vorname" \&amp;\&amp; "\$2" == "\$nachname" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "\$vorname \$nachname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "\$vorname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [[ "\$1" == "\$nachname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [ -n "\$1" ]
then
    echo "Das bin ich nicht"
else
    echo "Hallo Welt"

    i=0
    while [ \$i -lt 10 ]
    do
        echo "Hallo zum \$((\$i+1))."
        i=\$((\$i+1))
    done

    a=(Dies ist ein Text)
    a+=(Und seine Verlaengerung)

    i=0
    while [ \$i -lt 7 ]
    do
        echo "\${a[\$i]}"
        i=\$((\$i+1))
    done

    for s in "\${a[@]}"
    do
        echo "\$s"
    done

    l=\$(ls)
    for s in \$l
    do
        echo "\$s"
    done

fi

#!/bin/bash

# https://phpbb3.ituenix.de/viewtopic.php?p=2483\&amp;sid=352a143c22185737e70297dfb05df717#p2483

/bin/bash "\$1" "David" "Vajda"
/bin/bash "\$1" "David Vajda"
/bin/bash "\$1" "David"
/bin/bash "\$1" "Vajda"
/bin/bash "\$1" "Max Musterman"
/bin/bash "\$1"

### Schlimmer Fehler

#!/bin/bash

vorname="David"
nachname="Vajda"

if [[ "\$1" == "\$vorname" \&amp;\&amp; "\$2" == "\$nachname" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "\$vorname \$nachname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "\$vorname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [[ "\$1" == "\$nachname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [ -n "\$1" ]
then
    echo "Das bin ich nicht"
else
    echo "Hallo Welt"

    i=0
    while [ \$i -lt 10 ]
    do
        echo "Hallo zum \$((\$i+1))."
        i=\$((\$i+1))
    done

    a=(Dies ist ein Text)
    a+=(Und seine Verlaengerung)

    i=0
    while [ \$i -lt 7 ]
    do
        echo "\${a[\$i]}"
        i=\$((\$i+1))
    done

    for s in "\${a[@]}"
    do
        echo "\$s"
    done

    l=\$(ls)
    for s in \$l
    do
        echo "\$s"
    done

fi

### Schlimmer Fehler
# https://phpbb3.ituenix.de/viewtopic.php?p=2483\&amp;sid=352a143c22185737e70297dfb05df717#p2483

#!/bin/bash

vorname="David"
nachname="Vajda"

if [[ "\$1" == "\$vorname" \&amp;\&amp; "\$2" == "\$nachname" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "\$vorname \$nachname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "\$vorname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [[ "\$1" == "\$nachname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [ -n "\$1" ]
then
    echo "Das bin ich nicht"
else
    echo "Hallo Welt"

    i=0
    while [ \$i -lt 10 ]
    do
        echo "Hallo zum \$((\$i+1))."
        i=\$((\$i+1))
    done

    a=(Dies ist ein Text)
    a+=(Und seine Verlaengerung)

    i=0
    while [ \$i -lt 7 ]
    do
        echo "\${a[\$i]}"
        i=\$((\$i+1))
    done

    for s in "\${a[@]}"
    do
        echo "\$s"
    done

    l=\$(ls)
    for s in \$l
    do
        echo "\$s"
    done

fi

Das bin ich
Das bin ich
Das koennte ich sein
Das koennte ich sein
Das bin ich nicht
Hallo Welt
Hallo zum 1.
Hallo zum 2.
Hallo zum 3.
Hallo zum 4.
Hallo zum 5.
Hallo zum 6.
Hallo zum 7.
Hallo zum 8.
Hallo zum 9.
Hallo zum 10.
Dies
ist
ein
Text
Und
seine
Verlaengerung
Dies
ist
ein
Text
Und
seine
Verlaengerung
1461-boyens_draeger_hanse.jpg
addressdecodertestbench.c
akjs
alllinks.sh
a.out
asm15
asm16
automat15
automat15.c
bash20240527all.sh
bash20240527.out
bash20240527.sh
Bilder
binary2
binary2.c
binomial20240414a.c
crypto_from_scratch.txt
deepsearch1.c
deepsearch2
deepsearch2.c
doc
Dokumente
dos-inst
Downloads
float.c
fsmprogs
generategraphs10.c
generategraphs11
generategraphs11.c
generategraphs12.c
generategraphs2.c
generategraphs3.c
generategraphs4
generategraphs4.c
generategraphs5.c
generategraphs6.c
generategraphs7.c
generategraphs8.c
generategraphs9.c
generategraphs.c
generatetestbench2
generatetestbench3
generatetestbench4
generatetestbench5
gnu-hello
graph20240526.txt
graphs20240526-1.jpg
graphs20240526.aux
graphs20240526b-1.jpg
graphs20240526b.aux
graphs20240526b.log
graphs20240526b.pdf
graphs20240526b.tex
graphs20240526.log
graphs20240526.pdf
graphs20240526.tex
ieee754aufgabe
ieee754aufgabe2.c
ieee754aufgabe.c
ieee754aufgabe.o
inst
mail
Mars
matlab
mips32singlecycle2.vhdl
mips32singlecycle.vhdl
missfont.log
Musik
mydaemontestd
mydata.txt
myfind.sh
mysqldata.php
OEffentlich
out2123.txt
out2.txt
out.txt
password
password20240326.txt
quine
quine20240520.txt
quine20240520.vhdl
quine20240521.txt
quine20240521.vhdl
replace.sh
robertsedgewickgraph01.c
Schreibtisch
schulschriften.aux
schulschriften.log
Screenshot_20240525_222427.png
Screenshot_20240526_101034.png
Screenshot_20240527_102838.png
state3
svg
tagebuch.txt
texput.log
tu.txt
Videos
VirtualBox
VMs
Vorlagen
wave.ghw
work-obj93.cf

#!/bin/bash

vorname="David"
nachname="Vajda"

if [[ "\$1" == "\$vorname" \&amp;\&amp; "\$2" == "\$nachname" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "\$vorname \$nachname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das bin ich"
elif [[ "\$1" == "\$vorname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [[ "\$1" == "\$nachname" \&amp;\&amp; -z "\$2" ]]
then
    echo "Das koennte ich sein"
elif [ -n "\$1" ]
then
    echo "Das bin ich nicht"
else
    echo "Hallo Welt"

    i=0
    while [ \$i -lt 10 ]
    do
        echo "Hallo zum \$((\$i+1))."
        i=\$((\$i+1))
    done

    a=(Dies ist ein Text)
    a+=(Und seine Verlaengerung)

    i=0
    while [ \$i -lt 7 ]
    do
        echo "\${a[\$i]}"
        i=\$((\$i+1))
    done

    for s in "\${a[@]}"
    do
        echo "\$s"
    done

    l=\$(ls)
    for s in \$l
    do
        echo "\$s"
    done

fi

#!/bin/bash

/bin/bash "\$1" "David" "Vajda"
/bin/bash "\$1" "David Vajda"
/bin/bash "\$1" "David"
/bin/bash "\$1" "Vajda"
/bin/bash "\$1" "Max Musterman"
/bin/bash "\$1"

1.) Rechne die Zahl in binaer Darstellung  in eine Dezimale Darstellung um
0010100100001101b 10509d
2.) Rechne die Zahl in dezimal darstellung in eine Binaerdarstellung um
19942 0100110111100110
3.) Addiere die drei Zahlen schriftlich
             4296
+           57923
+           28557
-----------------
            90776
4.) Subtrahiere die letzten drei Zahlen schriftlich von der ersten schriftlich
             4615
-            4745
-           12131
-            4248
-----------------
           -16509
5.) Rechne die Zahl ins zweier komplement um, mit 8 Bit - und subtrahiere diese zahl von der ersten und rechne das Ergebnis nach dezimal
-102 -30 = -132
10011010 11100010 = 01111100
6.) Multipliziere die zwei Zahlen schriftlich
41518*18153 = 753676254
7.) Dividiere die zwei Zahlen schriftlich
16841/11183 = 1
8.) Errechne x Logarithmisch mit dem Taschenrechner
1420\^x = 643858255
Rechne die Zahl in IEEE-754 um 14040.250000

Image 16SO7CPsT6YxW9Ua-BCr6B7_hwk8eZVKZ

Image 16HssADb7yFEddWlkPT0Zgtp8yahHziXS

Image 16J7Aus6B077cP1JiuWoH8FrFqhox8lKS

Image 16L4S-F3TAQSZx845snHH2ujDPEVMZoWt

Image 16Nyp20iG7Bk2uPutNS9H3xwUerE0RRm2

Image 16QPhNFaLXedTVH-xg16W84HC9SYbrFr2

Image 16YpNhif5VqO__T7JjobhS-YRfrSOlQUR

Image 16ZdUjFh0awBKqG66Z5n0y_mhZexcMfU8

 0 0 0 0 0    0
 1 0 0 0 1    0
 2 0 0 1 0    0
 3 0 0 1 1    0
 4 0 1 0 0    1
 5 0 1 0 1    1
 6 0 1 1 0    1
 7 0 1 1 1    0
 8 1 0 0 0    1
 9 1 0 0 1    1
10 1 0 1 0    0
11 1 0 1 1    1
12 1 1 0 0    0
13 1 1 0 1    0
14 1 1 1 0    1
15 1 1 1 1    1



 4 0 1 0 0    1
 5 0 1 0 1    1
 6 0 1 1 0    1
 8 1 0 0 0    1
 9 1 0 0 1    1
11 1 0 1 1    1
14 1 1 1 0    1
15 1 1 1 1    1


Gruppe 1:
 4 0 1 0 0    1
 8 1 0 0 0    1
Gruppe 2:
 5 0 1 0 1    1
 6 0 1 1 0    1
 9 1 0 0 1    1
Gruppe 3:
11 1 0 1 1    1
14 1 1 1 0    1
Gruppe 4:
15 1 1 1 1    1

4:5         0 1 0 -
4:6         0 1 - 0
8:9         1 0 0 -
6:14        - 1 1 0
9:11        1 0 - 1
11:15       1 - 1 1
14:15       1 1 1 -



6:14        - 1 1 0
11:15       1 - 1 1
4:6         0 1 - 0
9:11        1 0 - 1
4:5         0 1 0 -
8:9         1 0 0 -
14:15       1 1 1 -


Gruppe 2:
6:14        - 1 1 0
Gruppe 3:
11:15       1 - 1 1

Gruppe 1:
4:6         0 1 - 0
Gruppe 2:
9:11        1 0 - 1

Gruppe 1:
4:5         0 1 0 -
8:9         1 0 0 -
Gruppe 3:
14:15       1 1 1 -



6:14        - 1 1 0
11:15       1 - 1 1
4:6         0 1 - 0
9:11        1 0 - 1
4:5         0 1 0 -
8:9         1 0 0 -
14:15       1 1 1 -


 0 0 0 0 0    0
 1 0 0 0 1    0
 2 0 0 1 0    0
 3 0 0 1 1    0
 4 0 1 0 0    1     4
 5 0 1 0 1    1     5
 6 0 1 1 0    1     6
 7 0 1 1 1    0
 8 1 0 0 0    1     8
 9 1 0 0 1    1     9
10 1 0 1 0    0
11 1 0 1 1    1     11
12 1 1 0 0    0
13 1 1 0 1    0
14 1 1 1 0    1     14
15 1 1 1 1    1     15

            4   5   6   8   9   11  14  15
6:14                *               *
11:15                           *       *
4:6         *       *
9:11                        *   *
4:5         *   *
8:9                     *   *
14:15                               *   *


            4   5   6   8   9   11  14  15
6:14                *               *
11:15                           *       *
4:6         *       *
9:11                        *   *
4:5         *   *                           p
8:9                     *   *               p
14:15                               *   *


            4   5   6   8   9   11  14  15
6:14                *               *
11:15                           *       *
4:5         *   *                           p
8:9                     *   *               p


6:14        - 1 1 0
11:15       1 - 1 1
4:5         0 1 0 -
8:9         1 0 0 -

        y   <=  (x2 and x1 and not x0) or
                (x3 and x1 and x0) or
                (not x3 and x2 and not x1) or
                (x3 and not x2 and not x1);

library ieee;
use ieee.std_logic_1164.all;

entity quine20240527 is
port (
    x3, x2, x1, x0: in std_logic;
    y: out std_logic
);
end;

architecture behaviour of quine20240527 is
begin
        y   <=  (x2 and x1 and not x0) or
                (x3 and x1 and x0) or
                (not x3 and x2 and not x1) or
                (x3 and not x2 and not x1);
end;

library ieee;
use ieee.std_logic_1164.all;

entity quine20240527all is
port (
    y: out std_logic
);
end;

architecture behaviour of quine20240527all is
    component quine20240527
    port (
        x3, x2, x1, x0: in std_logic;
        y: out std_logic
    );
    end component;
    signal x3, x2, x1, x0: std_logic;
begin
    q: quine20240527 PORT MAP (x3=>x3, x2=>x2, x1=>x1, x0=>x0, y=>y);

library ieee;
use ieee.std_logic_1164.all;

entity quine20240527 is
port (
    x3, x2, x1, x0: in std_logic;
    y: out std_logic
);
end;

architecture behaviour of quine20240527 is
begin
        y   <=  (x2 and x1 and not x0) or
                (x3 and x1 and x0) or
                (not x3 and x2 and not x1) or
                (x3 and not x2 and not x1);
end;

library ieee;
use ieee.std_logic_1164.all;

entity quine20240527testbench is
port (
    y: out std_logic
);
end;

architecture behaviour of quine20240527testbench is
    component quine20240527
    port (
        x3, x2, x1, x0: in std_logic;
        y: out std_logic
    );
    end component;
    signal x3, x2, x1, x0: std_logic;
begin
    q: quine20240527 PORT MAP (x3=>x3, x2=>x2, x1=>x1, x0=>x0, y=>y);
    x0 <= '0' after 0 ns, '1' after 10 ns, '0' after 20 ns, '1' after 30 ns, '0' after 40 ns, '1' after 50 ns, '0' after 60 ns, '1' after 70 ns, '0' after 80 ns, '1' after 90 ns, '0' after 100 ns, '1' after 110 ns, '0' after 120 ns, '1' after 130 ns, '0' after 140 ns, '1' after 150 ns;

    x1 <= '0' after 0 ns, '0' after 10 ns, '1' after 20 ns, '1' after 30 ns, '0' after 40 ns, '0' after 50 ns, '1' after 60 ns, '1' after 70 ns, '0' after 80 ns, '0' after 90 ns, '1' after 100 ns, '1' after 110 ns, '0' after 120 ns, '0' after 130 ns, '1' after 140 ns, '1' after 150 ns;

    x2 <= '0' after 0 ns, '0' after 10 ns, '0' after 20 ns, '0' after 30 ns, '1' after 40 ns, '1' after 50 ns, '1' after 60 ns, '1' after 70 ns, '0' after 80 ns, '0' after 90 ns, '0' after 100 ns, '0' after 110 ns, '1' after 120 ns, '1' after 130 ns, '1' after 140 ns, '1' after 150 ns;

    x3 <= '0' after 0 ns, '0' after 10 ns, '0' after 20 ns, '0' after 30 ns, '0' after 40 ns, '0' after 50 ns, '0' after 60 ns, '0' after 70 ns, '1' after 80 ns, '1' after 90 ns, '1' after 100 ns, '1' after 110 ns, '1' after 120 ns, '1' after 130 ns, '1' after 140 ns, '1' after 150 ns;
end;

Image 1QAxdAUIqvZ-0LRjoN5GzGYPWcVX2xFFa

Image 16h7Oz-E1KjfF49mmrsFtIOAHS-L55J4F

Image 16d4x7iO3ed_ncj4hVC0VFjPklSd3pvMB

Image 1gr0sfSgcvSBZFClqROrUHm1obxfP-D88

Image 178ix8y_-6tg6khjGydJMOes3f0dWhM0C

Image 17CM9DVeBkeo-O67ePodx3Ey6TxVH4jRS

Image 17DchUUIVcF_GyXElEaYMqbyfHwC9aMFn

Image 17DlvXlEmVfsmnTjo_QiM6KOm0qczoBAh

Image 17ESiCFjtUv6Rr6NFgms9vUYFbgeGodu5

Image 17HaKcaITOiPn2PlL72LUdccPfCpo8xU7

Image 17JB_n4AhbhvCOEWai5EkEVZ4DhskvRbx

Image 1DCR5UH8AcAdDKuVgQqy7zdBaQwNLX0OB

Zustand,Eingabe,Ausgabe,Folgezustand
1,0,1,4
1,1,1,3
2,0,1,1
2,1,1,2
3,0,1,3
3,1,1,1
4,0,1,2
4,1,0,4

z1+ := z2 and not x or z3 and x
z2+ := z2 and x or z4 and not x
z3+ := z1 and x or z3 and x
z4+ := z1 and not x or z4 and x

y := not (z4 and x)