This sample bakes a private key into the resulting docker image that contains the Tor daemon. The only thing you need to edit are args and volumes in docker-compose.yml.
docker-compose.yml:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
version: "3"
services:
hidden_service:
# we want to pass in the details of our hs AT BUILD TIME..
What is a proof by contradiction? A proof by contradiction is if $\neg P \Rightarrow F$ is true.
One assumes that a proposition P is False, and uses that to derive until a contradiction is reached, which can’t be True.
A popular example: Let’s prove that $\sqrt2$ is irrational. An irrational number is something that cannot be expanded into a fraction. (A common misconception is that Pi is $\frac{22}{7}$ and therefore rational; no it is not exactly $\frac{22}{7}$.
Assume that $\sqrt2$ is rational; such that we can represent it as $\frac{a}{b}$, where $\frac{a}{b}$ is a fraction in lowest terms.
$\Rightarrow \sqrt2 = \frac{a}{b}$ $\Rightarrow 2 = \frac{a^2}{b^2}$ $\Rightarrow 2b^2 = a^2$ $\Rightarrow 2 \mid a$ $\Rightarrow 4 \mid a^2$ $\Rightarrow 4 \mid 2b^2$ $\Rightarrow 2 \mid b^2$ $\Rightarrow 2 \mid b$ If both $a$ and $b$ are even, they are not in lowest terms, as both can be divided by 2 for further simplification. Hence we have a contradiction. $\square$
http://www.iamcal.com/misc/bf_debug/ Debugger to help you visualize what’s going on. The first brainfuck works by incrementing the first cell to 10, then the loop increments the second cell to 100 and the 3rd cell to 110, and the <<- decrements the loop “counter”, which is held by the first cell.
At the end of the loop we should have [0][100][110]. Everything after the loop just increments or decrements to the appropriate ascii decimal value and outputs to stdout.
Since the ascii decimal codes of the letters d, m, n, e, d are all in between 100 and 110 (a is 97), the shortest way I could think of was to have a big number to use as the loop counter and decrement it in intervals. 102 is 40% of 255, or 2/5ths, so after incrementing twice for cells 1, 2, and 3 go back to cell 0 and decrement by 5. At the end of the loop we should have [0][102][102][102].