diff --git a/20230320/bc-1.txt b/20230320/bc-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..29328eac74c0f2da4f2bdf2802e1e7ee331f5422 --- /dev/null +++ b/20230320/bc-1.txt @@ -0,0 +1,10 @@ +cassini/home/peter/bo/2023ss/bs/20230320> which bc +/usr/bin/bc +cassini/home/peter/bo/2023ss/bs/20230320> bc +bc 1.07.1 +Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc. +This is free software with ABSOLUTELY NO WARRANTY. +For details type `warranty'. +2 + 2 +4 +quit diff --git a/20230320/bc-2.txt b/20230320/bc-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..16fb2c25d92ec5494e20962ae26ff1b43f9918c3 --- /dev/null +++ b/20230320/bc-2.txt @@ -0,0 +1,15 @@ +#!/usr/bin/bc + +2 + 2 +cassini/home/peter/bo/2023ss/bs/20230320> chmod +x bc.sh +cassini/home/peter/bo/2023ss/bs/20230320> ls -l bc.sh +-rwxr-xr-x 1 peter peter 21 Mär 20 18:04 bc.sh +cassini/home/peter/bo/2023ss/bs/20230320> ./bc.sh +bc 1.07.1 +Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc. +This is free software with ABSOLUTELY NO WARRANTY. +For details type `warranty'. +4 +3 + 3 +6 +quit diff --git a/20230320/bc-3.txt b/20230320/bc-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..b5c354c45a16eef234d42be50b8a823b8e686481 --- /dev/null +++ b/20230320/bc-3.txt @@ -0,0 +1,10 @@ +#!/usr/bin/bc + +2 + 2 +quit +cassini/home/peter/bo/2023ss/bs/20230320> ./bc2.sh +bc 1.07.1 +Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc. +This is free software with ABSOLUTELY NO WARRANTY. +For details type `warranty'. +4 diff --git a/20230320/bc.sh b/20230320/bc.sh new file mode 100755 index 0000000000000000000000000000000000000000..824ea4ec82fb458e0f05cf8de828f5f41f142d49 --- /dev/null +++ b/20230320/bc.sh @@ -0,0 +1,3 @@ +#!/usr/bin/bc + +2 + 2 diff --git a/20230320/bc2.sh b/20230320/bc2.sh new file mode 100755 index 0000000000000000000000000000000000000000..f1bff564d4c6419879aa4ab5546490249ca21bc5 --- /dev/null +++ b/20230320/bc2.sh @@ -0,0 +1,4 @@ +#!/usr/bin/bc + +2 + 2 +quit diff --git a/20230320/if-1.txt b/20230320/if-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..e81f984e5d43bd30bc566fa2b9d4ddc8e52f3095 --- /dev/null +++ b/20230320/if-1.txt @@ -0,0 +1,8 @@ +cassini/home/peter/bo/2023ss/bs/20230320> grep Test test.txt +Dies ist ein Test. +cassini/home/peter/bo/2023ss/bs/20230320> echo $? +0 +cassini/home/peter/bo/2023ss/bs/20230320> grep Täst test.txt +cassini/home/peter/bo/2023ss/bs/20230320> echo $? +1 +cassini/home/peter/bo/2023ss/bs/20230320> diff --git a/20230320/if-2.txt b/20230320/if-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..e3b7e67d95d250a5e2a664c151d72acb553c562e --- /dev/null +++ b/20230320/if-2.txt @@ -0,0 +1,6 @@ +cassini/home/peter/bo/2023ss/bs/20230320> if grep Test test.txt; then echo "gefunden"; else echo "nicht gefunden"; fi +Dies ist ein Test. +gefunden +cassini/home/peter/bo/2023ss/bs/20230320> if grep Täst test.txt; then echo "gefunden"; else echo "nicht gefunden"; fi +nicht gefunden +cassini/home/peter/bo/2023ss/bs/20230320> diff --git a/20230320/if-3.txt b/20230320/if-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..a107c659c880bd0d28046ab91da8f0f643933c9a --- /dev/null +++ b/20230320/if-3.txt @@ -0,0 +1,5 @@ +cassini/home/peter/bo/2023ss/bs/20230320> if grep -q Test test.txt; then echo "gefunden"; else echo "nicht gefunden"; fi +gefunden +cassini/home/peter/bo/2023ss/bs/20230320> if grep -q Täst test.txt; then echo "gefunden"; else echo "nicht gefunden"; fi +nicht gefunden +cassini/home/peter/bo/2023ss/bs/20230320> diff --git a/20230320/loops-1.txt b/20230320/loops-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..02c799f6e5fc49d3b07e629df358148206ca6312 --- /dev/null +++ b/20230320/loops-1.txt @@ -0,0 +1,7 @@ +cassini/home/peter/bo/2023ss/bs/20230320> for x in *.pdf; do xpdf $x; done +cassini/home/peter/bo/2023ss/bs/20230320> for x in *.pdf; do echo $x; xpdf $x; done +bs-20230320.pdf +logo-hochschule-bochum-cvh-text.pdf +logo-hochschule-bochum.pdf +Operating_system_placement-de.pdf +unix-20230320.pdf diff --git a/20230320/loops-2.txt b/20230320/loops-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..f9cb81539ecb3fad0132653d63493fb84d76874f --- /dev/null +++ b/20230320/loops-2.txt @@ -0,0 +1,5 @@ +cassini/home/peter/bo/2023ss/bs/20230320> for x in Anton Bertha Cäsar Dora; do echo "Hallo, $x!"; done +Hallo, Anton! +Hallo, Bertha! +Hallo, Cäsar! +Hallo, Dora! diff --git a/20230320/loops-3.txt b/20230320/loops-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..6a209abaa8f6838e8f5110fdcbe4c0f1398068e5 --- /dev/null +++ b/20230320/loops-3.txt @@ -0,0 +1,11 @@ +cassini/home/peter/bo/2023ss/bs/20230320> for x in 1 2 3 4 5 6 7 8 9 10; do echo "$x * 7 = $(( x * 7 ))"; done +1 * 7 = 7 +2 * 7 = 14 +3 * 7 = 21 +4 * 7 = 28 +5 * 7 = 35 +6 * 7 = 42 +7 * 7 = 49 +8 * 7 = 56 +9 * 7 = 63 +10 * 7 = 70 diff --git a/20230320/loops-4.txt b/20230320/loops-4.txt new file mode 100644 index 0000000000000000000000000000000000000000..61aada44105c4ec1f39375e787d6c6713e2160c1 --- /dev/null +++ b/20230320/loops-4.txt @@ -0,0 +1,14 @@ +Das Unix-Programm "od" ist älter als die Bash, daher die Inkonsequenz: +https://de.wikipedia.org/wiki/Od_(Unix)#Geschichte + +cassini/home/peter/bo/2023ss/bs/20230320> od test.txt +0000000 064504 071545 064440 072163 062440 067151 052040 071545 +0000020 027164 000012 +0000023 +cassini/home/peter/bo/2023ss/bs/20230320> cat test.txt +Dies ist ein Test. +cassini/home/peter/bo/2023ss/bs/20230320> hexdump -C test.txt +00000000 44 69 65 73 20 69 73 74 20 65 69 6e 20 54 65 73 |Dies ist ein Tes| +00000010 74 2e 0a |t..| +00000013 +cassini/home/peter/bo/2023ss/bs/20230320> diff --git a/20230320/permissions-1.txt b/20230320/permissions-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..3ec4efb4213b8cba5920382759ad01a59389b6d9 --- /dev/null +++ b/20230320/permissions-1.txt @@ -0,0 +1,19 @@ +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt +-rw-r--r-- 1 peter peter 19 Mär 20 16:41 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> cat test.txt +Dies ist ein Test. +cassini/home/peter/bo/2023ss/bs/20230320> chmod -r test.txt +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt +--w------- 1 peter peter 19 Mär 20 16:41 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> cat test.txt +cat: test.txt: Keine Berechtigung +cassini/home/peter/bo/2023ss/bs/20230320> chmod -w test.txt +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt +---------- 1 peter peter 19 Mär 20 16:41 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> chmod +r test.txt +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt +-r--r--r-- 1 peter peter 19 Mär 20 16:41 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> chmod u+w test.txt +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt +-rw-r--r-- 1 peter peter 19 Mär 20 16:41 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> diff --git a/20230320/permissions-2.txt b/20230320/permissions-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..597972e37d9f898350409da8ec1c82374e05d76b --- /dev/null +++ b/20230320/permissions-2.txt @@ -0,0 +1,13 @@ +cassini/home/peter/bo/2023ss/bs/20230320> chmod 000 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt +---------- 1 peter peter 19 Mär 20 16:41 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> chmod 640 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt +-rw-r----- 1 peter peter 19 Mär 20 16:41 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> chmod 755 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt +-rwxr-xr-x 1 peter peter 19 Mär 20 16:41 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> chmod 644 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt +-rw-r--r-- 1 peter peter 19 Mär 20 16:41 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> diff --git a/20230320/permissions-3.txt b/20230320/permissions-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..c3a50070a55800e272b8fd122332daf23985a35c --- /dev/null +++ b/20230320/permissions-3.txt @@ -0,0 +1,4 @@ +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.txt +-rwxr-xr-x 1 peter peter 19 Mär 20 16:41 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> ./test.txt +./test.txt: Zeile 1: Dies: Kommando nicht gefunden. diff --git a/20230320/permissions-4.txt b/20230320/permissions-4.txt new file mode 100644 index 0000000000000000000000000000000000000000..f3f62a8fbd4f8f221d3cad46977060f443eb127b --- /dev/null +++ b/20230320/permissions-4.txt @@ -0,0 +1,22 @@ +cassini/home/peter/bo/2023ss/bs/20230320> cat test.sh +ls +echo "Hello, world!" +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.sh +-rw-r--r-- 1 peter peter 24 Mär 20 17:53 test.sh +cassini/home/peter/bo/2023ss/bs/20230320> ./test.sh +bash: ./test.sh: Keine Berechtigung +cassini/home/peter/bo/2023ss/bs/20230320> chmod 755 test.sh +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test.sh +-rwxr-xr-x 1 peter peter 24 Mär 20 17:53 test.sh +cassini/home/peter/bo/2023ss/bs/20230320> ./test.sh +bs-20230320.aux grep-1.txt hello-02.c test4.txt +bs-20230320.log grep-2.txt logo-hochschule-bochum-cvh-text.pdf test5.txt +bs-20230320.nav grep-3.txt logo-hochschule-bochum.pdf test6.txt +bs-20230320.out grep-4.txt Operating_system_placement-de.pdf test.sh +bs-20230320.pdf grep-5.txt permissions-1.txt test.txt +bs-20230320.snm grep-6.txt permissions-2.txt tmp.inputs +bs-20230320.tex grep-7.txt permissions-3.txt unix-20230320.pdf +bs-20230320.toc hello-01 pgslides.sty unix-20230320.tex +bs-20230320.txt hello-01.c test2.txt vic +foo hello-02 test3.txt wildcards-1.txt +Hello, world! diff --git a/20230320/permissions-5.txt b/20230320/permissions-5.txt new file mode 100644 index 0000000000000000000000000000000000000000..371f946bcb0fc5cbbd73f02cbee3c8446b94a43e --- /dev/null +++ b/20230320/permissions-5.txt @@ -0,0 +1,23 @@ +cassini/home/peter/bo/2023ss/bs/20230320> cat test2.sh +echo -n "Ihr Befehl: " +read cmd +$cmd +cassini/home/peter/bo/2023ss/bs/20230320> chmod 755 test2.sh +cassini/home/peter/bo/2023ss/bs/20230320> ls -l test2.sh +-rwxr-xr-x 1 peter peter 37 Mär 20 17:55 test2.sh +cassini/home/peter/bo/2023ss/bs/20230320> ./test2.sh +Ihr Befehl: ls +bs-20230320.aux grep-5.txt pgslides.sty +bs-20230320.log grep-6.txt test2.sh +bs-20230320.nav grep-7.txt test2.txt +bs-20230320.out hello-01 test3.txt +bs-20230320.pdf hello-01.c test4.txt +bs-20230320.snm hello-02 test5.txt +bs-20230320.tex hello-02.c test6.txt +bs-20230320.toc logo-hochschule-bochum-cvh-text.pdf test.sh +bs-20230320.txt logo-hochschule-bochum.pdf test.txt +foo Operating_system_placement-de.pdf tmp.inputs +grep-1.txt permissions-1.txt unix-20230320.pdf +grep-2.txt permissions-2.txt unix-20230320.tex +grep-3.txt permissions-3.txt vic +grep-4.txt permissions-4.txt wildcards-1.txt diff --git a/20230320/pipes-1.txt b/20230320/pipes-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..810c4b0205c66d329fcae3e23ac12d56a7742fdb --- /dev/null +++ b/20230320/pipes-1.txt @@ -0,0 +1,18 @@ +cassini/home/peter/bo/2023ss/bs/20230320> ls -l /usr/bin | grep -v "root *root" +insgesamt 1485232 +-rwsr-sr-x 1 daemon daemon 55560 Jul 24 2018 at +-rwxr-sr-x 1 root tty 14736 Mai 4 2018 bsd-write +-rwxr-sr-x 1 root shadow 71816 Jul 27 2018 chage +-rwxr-sr-x 1 root crontab 43568 Okt 11 2019 crontab +-rwxr-sr-x 1 root mail 18944 Dez 3 2017 dotlockfile +-rwxr-xr-- 1 root wireshark 112888 Feb 8 19:46 dumpcap +-rwxr-sr-x 1 root utmp 14440 Jun 10 2021 Eterm +-rwxr-sr-x 1 root shadow 31000 Jul 27 2018 expiry +-rwxr-sr-x 1 root mail 18688 Jul 31 2022 lockfile +-rwxr-sr-x 1 root mlocate 39608 Nov 14 2018 mlocate +-rwxr-sr-x 1 root mail 14344 Apr 23 2022 mutt_dotlock +-rwsr-sr-x 1 root mail 97488 Jul 31 2022 procmail +-rwxr-sr-x 1 root ssh 321672 Jan 31 2020 ssh-agent +-rwxr-sr-x 1 root utmp 1411072 Mai 21 2021 urxvt +-rwxr-sr-x 1 root utmp 1415168 Mai 21 2021 urxvtd +-rwxr-sr-x 1 root tty 34896 Jan 10 2019 wall diff --git a/20230320/projekte.txt b/20230320/projekte.txt new file mode 100644 index 0000000000000000000000000000000000000000..6896cfe4e44bf42562baf5f01a7ad5bdcaf0200b --- /dev/null +++ b/20230320/projekte.txt @@ -0,0 +1 @@ +https://gitlab.cvh-server.de/hardwarenahe-it/projekte diff --git a/20230320/setuid-setgid-bits-1.txt b/20230320/setuid-setgid-bits-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..6e086323b77bc6a8a34bca3a0148b0e33fe6bdec --- /dev/null +++ b/20230320/setuid-setgid-bits-1.txt @@ -0,0 +1,13 @@ +cassini/home/peter/bo/2023ss/bs/20230320> ls -l /usr/bin/sudo +-rwsr-xr-x 1 root root 157192 Jan 16 21:03 /usr/bin/sudo +cassini/home/peter/bo/2023ss/bs/20230320> ls -l /home/enigma/ +insgesamt 8 +drwxr-xr-x 2 enigma enigma 4096 Mai 26 2018 Desktop +drwx------ 2 enigma enigma 4096 Aug 22 2018 Downloads +cassini/home/peter/bo/2023ss/bs/20230320> ls -l /home/enigma/Downloads/ +ls: Öffnen von Verzeichnis '/home/enigma/Downloads/' nicht möglich: Keine Berechtigung +cassini/home/peter/bo/2023ss/bs/20230320> sudo ls -l /home/enigma/Downloads/ +[sudo] Passwort für peter: +insgesamt 5592 +-rw-r--r-- 1 enigma enigma 2856917 Mai 30 2018 enigmail-2.0.6-sm+tb.xpi +-rw-r--r-- 1 enigma enigma 2866462 Aug 22 2018 enigmail-2.0.8-sm+tb.xpi diff --git a/20230320/sticky-bit-1.txt b/20230320/sticky-bit-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..3865a419e2a39069f39af0e3bc074f202efaae8c --- /dev/null +++ b/20230320/sticky-bit-1.txt @@ -0,0 +1,7 @@ +-rw-r--r-- 1 enigma enigma 17 Mär 20 18:46 test.txt +cassini/home/peter/bo/2023ss/bs/20230320> cat /tmp/test.txt +Hi! Hier Enigma! +cassini/home/peter/bo/2023ss/bs/20230320> rm /tmp/test.txt +rm: reguläre Datei (schreibgeschützt) '/tmp/test.txt' entfernen? y +rm: das Entfernen von '/tmp/test.txt' ist nicht möglich: Die Operation ist nicht erlaubt +cassini/home/peter/bo/2023ss/bs/20230320> diff --git a/20230320/test.sh b/20230320/test.sh new file mode 100755 index 0000000000000000000000000000000000000000..b149a96cdc40c18cad83bca98f0226a7f178be1d --- /dev/null +++ b/20230320/test.sh @@ -0,0 +1,2 @@ +ls +echo "Hello, world!" diff --git a/20230320/test2.sh b/20230320/test2.sh new file mode 100755 index 0000000000000000000000000000000000000000..90ce620f7d6c7c8e2d6280eea3ad7c80cccace36 --- /dev/null +++ b/20230320/test2.sh @@ -0,0 +1,7 @@ +echo -n "Ihr Befehl: " +read cmd +$cmd + +# So nicht programmieren! +# Dies ist eine Sicherheitslücke! +# Benutzer dürfen Code eingeben, der dann ausgeführt wird. diff --git a/20230320/test3.sh b/20230320/test3.sh new file mode 100755 index 0000000000000000000000000000000000000000..e4842fac9dd9436103362eea4216a1ef424cdac4 --- /dev/null +++ b/20230320/test3.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +ls