diff --git a/hacking_session/exercise_files/fileSystems/TestDisk b/hacking_session/exercise_files/fileSystems/TestDisk new file mode 100644 index 0000000000000000000000000000000000000000..dba78e916eb90ec648eeb3f7db10f73f2112e776 Binary files /dev/null and b/hacking_session/exercise_files/fileSystems/TestDisk differ diff --git a/hacking_session/exercise_files/fileSystems/image.iso b/hacking_session/exercise_files/fileSystems/image.iso new file mode 100644 index 0000000000000000000000000000000000000000..dd64b158e68ebc556683e92bd433268fac0f30f3 --- /dev/null +++ b/hacking_session/exercise_files/fileSystems/image.iso @@ -0,0 +1 @@ +You successfully wrote an image to fake disk! diff --git a/hacking_session/exercise_files/fileSystems/partition1 b/hacking_session/exercise_files/fileSystems/partition1 new file mode 100644 index 0000000000000000000000000000000000000000..9e0f96a2a253b173cb45b41868209a5d043e1437 Binary files /dev/null and b/hacking_session/exercise_files/fileSystems/partition1 differ diff --git a/hacking_session/exercise_files/fileSystems/partition2 b/hacking_session/exercise_files/fileSystems/partition2 new file mode 100644 index 0000000000000000000000000000000000000000..9e0f96a2a253b173cb45b41868209a5d043e1437 Binary files /dev/null and b/hacking_session/exercise_files/fileSystems/partition2 differ diff --git a/hacking_session/exercise_files/grep_exercise.md b/hacking_session/exercise_files/grep_exercise.md new file mode 100644 index 0000000000000000000000000000000000000000..a2aec07d046a29790cd7ead1302a3ef9a9a80c44 --- /dev/null +++ b/hacking_session/exercise_files/grep_exercise.md @@ -0,0 +1,72 @@ +# For the grep exercise + +## Explanation + +This is a textfile for use with the grep exercise. +It contains some words, so you can search for patterns. + +Dog +Dig +Dug + +Here is a line containing a ## that is not at the beginning of the line because I am evil. + +Brat + +Cat +Rat +Sat +Mat +Wat +Latin +Pat +Hat +Fat +Vat +Tat +Bat + + +## Animals + +This subsection contains a list of "animals". +(The plus signs are there to make things slightly easier for you. After all, it's fairly hard to distinguish animals from other words using only regexes) + ++ Dangernoodle, a natural enemy of the Booplesnoot ++ Majestic Sea Flap-Flap ++ Dangerous Sea Flap-Flap ++ Trash Panda ++ Fart Squirrel (not as undangerous as it sounds) ++ Danger Floof - not to be confused with the Danger Water Cow ++ Nope Rope ++ Sword Pig (not as dangerous as it sounds) ++ Bacon Puppy ++ Dapper Chickens ++ and finally Strangerdanger which could be a name for a dog. + +### This is a subsubsection + +* It contains +* Some list elements +* Such as this one + +### Code + +Here's some code that can be searched. +This is a bit harder, since the exercises corresponding to it, require regexes that span over multiple lines. + +```java + +class Main { + public static void main(String[] args) { + Out o = new Out(); + o.out(); + } +} + +class Out { + public void out() { + System.out.println("Hello World!"); + } +} +``` diff --git a/hacking_session/exercise_files/jobs/infiniteloop.sh b/hacking_session/exercise_files/jobs/infiniteloop.sh new file mode 100755 index 0000000000000000000000000000000000000000..2ac54cfa89c981f13d5e471c42029728f37e5928 --- /dev/null +++ b/hacking_session/exercise_files/jobs/infiniteloop.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +while true; do + echo "this is an infinite loop... kill me if you can" + sleep 1 +done diff --git a/hacking_session/exercise_files/supercoolNumericalSimulation.c b/hacking_session/exercise_files/supercoolNumericalSimulation.c new file mode 100644 index 0000000000000000000000000000000000000000..2bf7eb79e2aeb4d7ce45f45b23442dbfd86c52b8 --- /dev/null +++ b/hacking_session/exercise_files/supercoolNumericalSimulation.c @@ -0,0 +1,71 @@ +/* + * This program is a super awesome numerical simulation of some super duper + * new ultra cool physcial thingy. And of course it takes forever to run, + * so you have to run on the ultra modern amazingly new TheAlt super cluster. + */ + +#include <stdio.h> +#include <unistd.h> +#include <time.h> +#include <stdlib.h> + +int main() { + printf("Starting calculation...\n"); + + sleep(2); + + // some cleverly named variables + int a, b, c; + + // initialize the variables + a = 42; + b = 0; + c = 0; + + //actually do the calculation + b = c++; + b++; + int temp = a; + a = b + c; + + srand(time(NULL)); + int r; + int i = 200000; + while (i --> 0) { + r = rand(); + printf("%d \n", r); + sleep (0.8); + if (i == 150000) { + printf ("\n preprocessing done\n"); + sleep(1); + } else if (i == 1000) { + printf("\n Main calculations done. Starting Clean up \n"); + sleep(1); + } + } + + c = temp+1; + a = temp; + int res = a; + + char result[3]; + result[2] = 0; + + if (res == 42) { + // we are happy the calculation worked + snprintf(result, 3, "%d", res); + } else { + result[0] = '4'; // correct the wrong calculation + result[1] = '2'; + } + + // save the result in the res file + FILE *fp; + fp = fopen("AmazingResults.txt", "w+"); + fputs(result, fp); + fclose(fp); + + // notify the user + printf("the answer to everything has just been calculated\n"); + return 0; +} diff --git a/hacking_session/exercises.pdf b/hacking_session/exercises.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7c33d29bb7d162baf89c834536ddedc7f12e698c Binary files /dev/null and b/hacking_session/exercises.pdf differ diff --git a/hacking_session/solutions.pdf b/hacking_session/solutions.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3ecd73e21738eeb076b4d96f572d73f0b3d6a58c Binary files /dev/null and b/hacking_session/solutions.pdf differ