diff --git a/.gitignore b/.gitignore index bacca8e..0322ffb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ __pycache__/ output/ +venv/ diff --git a/README.md b/README.md index 23fcca7..cbad282 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,9 @@ In order to use sidenotes and lightboxes, add `filters.py` as custom jinja filte from sys import path from os import curdir path.append(curdir) - from filters import add_lightboxes, add_sidenotes + from filters import add_sidenotes - JINJA_FILTERS = {'add_lightboxes': add_lightboxes, - 'add_sidenotes': add_sidenotes} + JINJA_FILTERS = {'add_sidenotes': add_sidenotes} ## License diff --git a/content/posts/commit-vandalism.md b/content/blog/commit-vandalism.md similarity index 97% rename from content/posts/commit-vandalism.md rename to content/blog/commit-vandalism.md index 8371831..7337525 100644 --- a/content/posts/commit-vandalism.md +++ b/content/blog/commit-vandalism.md @@ -2,17 +2,13 @@ Title: git commit --vandalism Date: 2023-05-25 18:55 Author: Error Slug: commit-vandalism -Summary: SHA-1 has been broken for some time, but is still used in git. To find out how git behaves when it encounters such a hash collision, I vandalized its source code and caused some collisions myself. +Summary: Vandalizing git to cause some hash collisions and find out how it behaves in that case License: CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/ -## Disclaimer - -This is not a vulnerability report. +_This is not a vulnerability report. I intentionally disabled safeguards in the code in order to be able observe this behavior. -However, it's a nice example for why you shouldn't use SHA-1 for anything security related and a good opportunity to learn more about the inner workings of git. - -## SHAttering git +However, it's a nice example for why you shouldn't use SHA-1 for anything security related and a good opportunity to learn more about the inner workings of git._ In 2017, the Cryptology Group at Centrum Wiskunde & Informatica (CWI) and the Google Research Security, Privacy and Anti-abuse Group announced the first (public) SHA-1 hash collision. They generated 2 PDF files with the same hash in an attack they called SHAttered. @@ -20,13 +16,14 @@ While it still required a lot of processing power (the equivalent of 6,500 years IDs in git, for example for commits, are generated using SHA-1 by default. As explained by git's creator, Linus Torvalds, the hash function is not used for security. -It's simply used to generate a checksum, like e.g. a CRC.[°The quote "We check a checksum that's cryptographically secure. Nobody has been able to break SHA-1" didn't hold up that well, but in general, Linus' point still stands: git uses SHA-1 for consistency checks, not for security. ] [^2] +It's simply used to generate a checksum, like e.g. a CRC.[°The quote "We check a checksum that's cryptographically secure. Nobody has been able to break SHA-1" didn't hold up that well, but in general, Linus' point still stands: git uses SHA-1 for consistency checks, not for security.] [^2] But what happens if a collision occurs, or someone intentionally causes a collision? Let's try it out. So if the SHAttered files already have a hash collision, they could be used to cause a collision in git, right? Let's put them in a repository and find out. + :::bash $ wget https://shattered.io/static/shattered-1.pdf -O shattered1.pdf -q $ sha1sum shattered-1.pdf 38762cf7f55934b34d179ae6a4c80cadccbb7f0a shattered-1.pdf @@ -39,6 +36,7 @@ Let's put them in a repository and find out. As promised, these files have different contents, but the same SHA-1 hash. The next step is to add them to a git repository and observe what happens. + :::bash $ cp shattered-1.pdf shattered.pdf $ git add shattered.pdf $ git commit -m 'shattered' @@ -57,19 +55,19 @@ Such a collision did not happen. The file was updated successfully in the second commit and checking out the first commit restores the original version. Investigating this closer shows that git somehow calculates different hashes for these files. + :::bash $ git hash-object shattered-1.pdf b621eeccd5c7edac9b7dcba35a8d5afd075e24f2 $ git hash-object shattered-2.pdf ba9aaa145ccd24ef760cf31c74d8f7ca1a2e47b0 -## Objects and IDs in git - Internally, git is a key-value store. It generates an ID for each object that it stores, which can later be used to identify and retrieve the object. By default, this ID is a SHA-1 hash. The input given to the hash function depends on the object type. For files, which are stored as so called blobs, the ID is generated by hashing the string `blob`, the length of the file, a null byte and the file itself. [^3] + :::bash $ echo "so long and thanks for all the fish" > test.txt $ git hash-object test.txt 8b86cb67f1f19db567a100b55edb5466a33e7fb7 @@ -80,6 +78,7 @@ Blobs can be assigned names to using tree objects. These objects can group multiple blobs and trees, which are referenced by their id. [^3] A tree object could look like this for example: + :::bash $ git cat-file -p 8004c8a7b6fce1452539556bb4c4c91b92b5c2bc 100644 blob ba9aaa145ccd24ef760cf31c74d8f7ca1a2e47b0 shattered.pdf @@ -90,6 +89,7 @@ Commits are just another object type in git. These objects associate a tree with an author and committer,[°The author and the committer can be different. The author is who wrote the code and the committer is who added it to the repository.] a parent commit (if it exists) and a commit message to describe to changes included in this commit. [^3] The resulting object can once again be viewed with `git cat-file`. + :::bash $ git cat-file -p f1906a7bf1c4c8ce49f264e2f3ba313c305b7ede tree 8004c8a7b6fce1452539556bb4c4c91b92b5c2bc parent 0aa8c5ad0be568d680d5f613807bde46a39424e3 @@ -100,10 +100,6 @@ The resulting object can once again be viewed with `git cat-file`. The commit ID is generated by hashing this information, prepended by the same header that is used for the other object types: `$object-type $length\0`.[°You can find a nice example how the commit hash is constructed [here](https://gist.github.com/masak/2415865 "How is git commit sha1 formed").] -## Causing Collisions - -### Vandalism - OK, so that's the reason why `git hash-object` returns different values for the two SHAttered files.[°Try it yourself if you want: prepending any data to these files will make their SHA-1 hashes differ. `echo test | cat - shatterd-1.pdf | sha1sum` results in a different hash than `echo test | cat - shatterd-2.pdf | sha1sum`] Further, this explains why the commit hashes didn't collide. There won't be any progress made by using the existing SHA-1 hash collision from SHAttered, but collisions can still happen. @@ -115,6 +111,7 @@ Git can be built with multiple different SHA-1 backends. By default, it uses an implementation with a collision attack detection mechanism.[°This collision attack detection is not relevant for our experiment for now. We'll get back to it later.] It can be found in the `SHA1DC` directory. + :::C int SHA1DCFinal(unsigned char output[20], SHA1_CTX *ctx) { uint32_t last = ctx->total & 63; @@ -163,10 +160,9 @@ This reduces the effective length of the identifier to 1 byte. We're not looking for a specific hash, any collision will do. The first collisions should occur after a few tries.[°Such collisions are already very likely after a surprisingly small amount of attempts if the value range is not too large. Look up the birthday problem if you don't know it.] -### Test Set Up - So let's compile git with our "improvement" and try to cause some collisions. + :::bash $ touch test $ ../git/git add test $ ../git/git commit -m 'test' @@ -196,6 +192,7 @@ The fist two commits may not collide, but it's already obvious what our little m Continuing to add and commits to this repository, the first collision was observed on the 7th attempt. + :::bash $ touch test7 $ ../git/git add test7 $ ../git/git commit -m 'test7' @@ -215,6 +212,7 @@ It looks like the attempt to add a new object failed silently. On the 15th attempt, another interesting collision occurred: + :::bash $ touch test15 $ ../git/git add test15 $ ../git/git commit -m 'test15' @@ -246,8 +244,6 @@ After the creation of the new commit object once again failed silently, git proc This confirms the assumption that git will keep the existing object in case of a collision. The other commits that got rolled back are still present as objects in git and can be checked out, but especially if the user does not notice what happened here and continues working, this can seriously mess up the commit history. -### Observations - Those tests were continued until the following collisions occurred and git's behavior could be observed: Collisions between two blobs @@ -287,7 +283,7 @@ Collisions between commits and tags : Creating the new commit object fails. The existing tag object remains unchanged. Git attempts to check out the new commit (that wasn't created) and fails with the error message `fatal: cannot update ref 'refs/heads/main': trying to write non-commit object $HASH to branch 'refs/heads/main'`. Collisions between tags and blobs -: A new file is created under `.git/refs/tags` pointing at the hash, but the creation of the new tag object under `.git/objects` fails silently. The existing blob object remains unchanged. +: A new file is created under `.git/refs/tags` pointing at the hash, but the creation of the new tag object under `.git/objects` fails silently. The existing blob object remains unchanged. Collisions between tags and trees : A new file is created under `.git/refs/tags` pointing at the hash, but the creation of the new tag object under `.git/objects` fails silently. The existing tree object remains unchanged. The tag is displayed by `git tag -l`, but attempts at checking it out fail with the error message `fatal: Cannot switch branch to a non-commit`. @@ -298,16 +294,12 @@ Collisions between tags and commits Collisions between two tags : A new file is created under `.git/refs/tags` pointing at the hash, but the creation of this new tag object under `.git/objects` fails silently. The existing tag object remains unchanged. Since the new tag reference object points at the old tag object, the new tag will be an alias for the old tag, with the same message and object reference. -### Summary - Git does not overwrite existing objects. Creating a new object with a hash that's already associated with another object always fails silently. However, depending on the object type, git shows some interesting behavior. If the object type fits, git will just continue with it as if nothing is wrong, e.g. it will commit an old tree or checkout an old commit. Git only responds with an error if the object types are incompatible, e.g. if the collision causes a reference to a tree to point at a tag object instead. -## Mitigation - Hash collisions, intentional oŕ not, can become a problem for git. To mitigate this risk, git includes a mechanism that detects SHA-1 collision attacks and reacts by hashing the suspected block 3 times, extending SHA-1 from 80 to 240 steps in these cases. This ensures that different hashes are generated in theses cases.[^4] @@ -316,8 +308,6 @@ Further, git does not only support SHA-1. It supports SHA-256, too. Unlike SHA-1, SHA-256 is considered cryptographically secure. -## Conclusion - Actual SHA-1 collisions are very unlikely to occur as a coincidence. The collisions in this experiment could only be observed after the code was modified to limit the effective hash size to 1 byte. Otherwise, it would not have been possible to create collisions with the available resources. diff --git a/content/posts/rfcartography.md b/content/blog/rfcartography.md similarity index 88% rename from content/posts/rfcartography.md rename to content/blog/rfcartography.md index f047a61..364fa57 100644 --- a/content/posts/rfcartography.md +++ b/content/blog/rfcartography.md @@ -2,12 +2,10 @@ Title: RFCartography - Visualizing relations between RFCs Date: 2023-02-28 19:50 Author: Error Slug: rfcartography -Summary: RFCs make up a nice set of structured data with many relations. I built a small(-ish) website that analyzes these relationships and visualizes them as graphs. +Summary: Analyzing relationships between RFCs and drawing graphs of them License: CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/ -## Setting Sails - RFCs are nice documents which explain how the internet works. They define protocols, describe best practices and discuss the organisation of internet infrastructure. Unlike some standards from other organizations, they are publicly available for free, usually written in a comprehensible manner and structured in a logical way. @@ -17,7 +15,7 @@ I always liked the way RFCs are connected to each other: Information about which RFC updates which, which RFC is obsoleted by which, and so on, all displayed at the top of the document, easy to find. So I decided to create RFCartography[°portmanteau word built out of "RFC" and "Cartography"; If you were under the impression that it has something to do with radio frequencies, you were misled, sorry.], a small tool that draws graphs of these relations. -![A graph of the relations of RFC791 (Internet Protocol) generated by RFCartography]({static}/posts/rfcartography/791.svg "A graph of the relations of RFC791 (Internet Protocol) generated by RFCartography") +![A graph of the relations of RFC791 (Internet Protocol) generated by RFCartography]({static}/blog/rfcartography/791.svg "A graph of the relations of RFC791 (Internet Protocol) generated by RFCartography") Parsing all the RFCs in order to extract the required information would have been a lot of effort and probably prone to errors. Fortunately, [rfc-editor.org](https://rfc-editor.org) has a nice, machine readable RFC index file in XML format with all the meta data for each RFC. [^1] @@ -41,14 +39,13 @@ is-also see-also : references other relevant documents [^2] -## How the Cartographer works RFCartography consists out of the IndexParser component, which parses the index file and makes its information available, and the RFCartography component, which builds the requested graphs and generates SVGs from them. This is held together by a Flask application that initially calls the IndexParser and provides the data returned by the parser to the RFCartographer, which it then repeatedly consults to generate graphs and render SVGs. Further, the Flask application implements the web frontend. The application is made available by a web server and a wsgi server. -![Component diagram of RFCartography]({static}/posts/rfcartography/components.svg "Component diagram of RFCartography") +![Component diagram of RFCartography]({static}/blog/rfcartography/components.svg "Component diagram of RFCartography") When a request is received, the Flask application calls the RFCartographer to generate the subgraph belonging to the requested RFC. In order to do this, the initial RFC is added to a queue. @@ -80,9 +77,7 @@ Once the queue is empty, the subgraph generation is completed and the graph can Afterwards, the subgraph can be rendered into a SVG with the help of pyplot. -## Here be Dragons - -Of course it does not work without problems. +Of course this does not work without problems. First of all, RFCartography is really slow. Generating and rendering graphs takes a while, leading to long response times. This can be mitigated to a degree by caching responses, but to really improve on this issue, the application should probably use a database backend.[°I'll add this to RFCartography at some point] @@ -93,9 +88,7 @@ However, this does not work in some edge cases. If, for example, a subgraph consists out of only one node, pyplot does not add links to it. Further, it does not add links to the nodes if different shapes are used for different node types.[°Using different shapes would have been nice from an accessibility point of view, but since it doesn't work at the moment, RFCartography has to rely on colors only.] -![A graph of the relations of RFC2322 (Management of IP numbers by peg-dhcp) generated by RFCartography]({static}/posts/rfcartography/2322.svg "A graph of the relations of RFC2322 (Management of IP numbers by peg-dhcp) generated by RFCartography") - -## Draw your own Maps +![A graph of the relations of RFC2322 (Management of IP numbers by peg-dhcp) generated by RFCartography]({static}/blog/rfcartography/2322.svg "A graph of the relations of RFC2322 (Management of IP numbers by peg-dhcp) generated by RFCartography") You can try RFCartography yourself on [rfcartography.net](https://rfcartography.net/ "RFCartography"). The source code can be found [here](https://git.undefinedbehavior.de/undef/RFCartography "RFCartography - undefined git server"). diff --git a/content/posts/rfcartography/2322.svg b/content/blog/rfcartography/2322.svg similarity index 100% rename from content/posts/rfcartography/2322.svg rename to content/blog/rfcartography/2322.svg diff --git a/content/posts/rfcartography/791.svg b/content/blog/rfcartography/791.svg similarity index 100% rename from content/posts/rfcartography/791.svg rename to content/blog/rfcartography/791.svg diff --git a/content/posts/rfcartography/components.svg b/content/blog/rfcartography/components.svg similarity index 100% rename from content/posts/rfcartography/components.svg rename to content/blog/rfcartography/components.svg diff --git a/content/posts/scroip.md b/content/blog/scroip.md similarity index 86% rename from content/posts/scroip.md rename to content/blog/scroip.md index 0b451d5..57777fe 100644 --- a/content/posts/scroip.md +++ b/content/blog/scroip.md @@ -2,12 +2,10 @@ Title: Slot Car Racing over IP (SCRoIP) Date: 2022-08-28 16:05 Author: Error Slug: scroip -Summary: I built a remote control for a slot car racing track to play with it over the LAN. It's unnecessary complicated and inefficient, but at least it supports IPv6. Ladies, Gentlemen and everyone else, start your engines. +Summary: A remote control for a slot car racing tracks; Unnecessarily complicated and inefficient; Ladies, Gentlemen and everyone else, start your engines. License: CC-BY-NC https://creativecommons.org/licenses/by-nc/4.0/ -## The Idea - When I was a child, I used to play a lot with my slot car racing track. After stumbling upon it again recently, I started wondering if I could build something to control it over the network. Not that I needed a remote control for it, but it seemed like a fun project. @@ -15,11 +13,9 @@ However, simply creating an API that offers precise control over the device seem So I came up with the idea to control it with the network traffic itself. The more traffic is sent to the remote control, the faster the car is supposed to go.[°Use more bandwidth!!!] -## Reversing - In order to build the remote control, the first step was to figure out how the slot car racing system works. So I disassembled it and took a look at its wiring. -![Simplified circuit diagram for a slot car racing system]({static}/posts/scroip/carrera.svg "Simplified circuit diagram of a slot car racing system") +![Simplified circuit diagram for a slot car racing system]({static}/blog/scroip/carrera.svg "Simplified circuit diagram of a slot car racing system") The underlying mechanism is fairly simple. The power supply provides about 14.8 V DC voltage, which is used to power the car's engine. The speed of the car is controlled by a variable resistor within the controller, which allows to control the voltage the car receives. @@ -27,19 +23,15 @@ Pushing the controller further down lowers the resistance, which raises the volt A third wire is used to brake the car when the controller is in its neutral position by utilizing the current generated by the motor when the car is rolling out. A look at wikipedia confirms this analysis. [^1] -## Building a digital Controller - Now that I understood the mechanism, the next step was to create a digital version of it, so that I could control the slot car racing track with a Raspberry Pi. My first idea was to simply use a digital potentiometer. However, searching for a suitable digipot, I quickly realized that there were no options with the desired dimensions of about 30 Ω available. Therefore I built it myself using a few resistors, solid state relais and multiplexers.[°I'm sure there are simpler solutions for this, but, well, it worked for me.] -![SCRoIP controller circuit diagram]({static}/posts/scroip/scroip.svg "SCRoIP controller circuit diagram") +![SCRoIP controller circuit diagram]({static}/blog/scroip/scroip.svg "SCRoIP controller circuit diagram") For the sake of simplicity,[°or maybe out of laziness, who knows? :)] I did not add the braking mechanism from the analog controller to my digital version. -## Implementing the Server - With the hardware fully assembled and soldered, it was time to have a look at the software. Python offers an easy way of implementing TCP servers.[°This project will use TCP. Even though the payload is immediately discarded, reliability is of the utmost importance and packet loss will not be accepted!!!] By default, it only supports IPv4, but IPv6 support can be added by setting `address_family` to `AF_INET6`. @@ -70,17 +62,15 @@ Once every 100 ms, it then calculates the average throughput for that time perio The full server code can be found [here](https://git.undefinedbehavior.de/undef/SCRoIP "Slot Car Racing over IP - SCRoIP - undefined git server"). -## Lights out and away we go - Once the server was implemented as well, all that was left to do was to test it. So I deployed the server script to a Raspberry Pi, connected its GPIO pins to the controller and the controller to the slot car racing track. Using netcat, I was now able to accelerate the car with the network traffic I generated: diff --git a/content/posts/scroip/carrera.svg b/content/blog/scroip/carrera.svg similarity index 100% rename from content/posts/scroip/carrera.svg rename to content/blog/scroip/carrera.svg diff --git a/content/posts/scroip/demo.webm b/content/blog/scroip/demo.webm similarity index 100% rename from content/posts/scroip/demo.webm rename to content/blog/scroip/demo.webm diff --git a/content/posts/scroip/scroip.svg b/content/blog/scroip/scroip.svg similarity index 100% rename from content/posts/scroip/scroip.svg rename to content/blog/scroip/scroip.svg diff --git a/content/favicon.svg b/content/favicon.svg index 9af5364..50bcd94 100644 --- a/content/favicon.svg +++ b/content/favicon.svg @@ -2,158 +2,59 @@ diff --git a/content/pages/about.md b/content/pages/about.md new file mode 100644 index 0000000..7fe3606 --- /dev/null +++ b/content/pages/about.md @@ -0,0 +1,17 @@ +Title: About +Date: 2023-10-21 20:22 +Author: Error +Status: published +Summary: You encountered an error... +Hidemeta: True + +## Hi, I'm Error. + +I'm a security engineer from Germany interested in networks, security, privacy and many other topics. +I enjoy spending time in hackspaces and can often be found at CCC events. + +On this blog, I'll write about some projects of mine. +Some of them might be more usefull, some of them less. +In the end, most of them are the result of me being curious about something and simply trying it out. + +Feel free to look around. diff --git a/content/pages/contact.md b/content/pages/contact.md index 4e4989a..c071e9c 100644 --- a/content/pages/contact.md +++ b/content/pages/contact.md @@ -1,12 +1,15 @@ Title: Contact -Date: 2023-03-25 16:45 +Date: 2023-10-21 20:32 Author: Error Status: published -Summary: Information on how to contact me +Summary: Error messages +Hidemeta: True -## Mail -My mail address is `error[at]mail.undefinedbehavior.de`. If you are using PGP, please encrypt your mails to me. You can find my PGP key here: +You can find me on the fediverse as @Error on [chaos.social](https://chaos.social "chaos.social mastodon instance"). +My mail address is `error[at]mail.undefinedbehavior.de`. +If you are using PGP, please encrypt your mails to me. +You can find my PGP key here: -----BEGIN PGP PUBLIC KEY BLOCK----- @@ -44,6 +47,4 @@ My mail address is `error[at]mail.undefinedbehavior.de`. If you are using PGP, p =+HJ8 -----END PGP PUBLIC KEY BLOCK----- -## Fediverse - -You can find me on [chaos.social](https://chaos.social "chaos.social mastodon instance") as @Error. +Feel free to say hello. \ No newline at end of file diff --git a/content/pages/credits.md b/content/pages/credits.md index 5d7414d..0bd36f8 100644 --- a/content/pages/credits.md +++ b/content/pages/credits.md @@ -1,17 +1,21 @@ Title: Credits -Date: 2022-08-28 16:05 +Date: 2023-08-26 22:10 Author: Error Status: hidden Summary: Credit where credit is due +Hidemeta: True ## Pelican This site is powered by [Pelican](https://getpelican.com "Pelican Static Site Generator, Powered by Python"). Pelican is a static site generator written in python. -It's licensed under the [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/#AGPL "GNU Affero General Public License") +It's licensed under the [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/#AGPL "GNU Affero General Public License"). -## LATEX.css +## Fonts -This site's template is based on [LATEX.css](https://latex.now.sh "LaTeX.css"), a CSS library that makes a website look like a LATEX document. -LATEX.css is licensed under the MIT License. +This website uses [Maven Pro](https://fonts.google.com/specimen/Maven+Pro) and [Oxygen Mono](https://fonts.google.com/specimen/Oxygen+Mono), both of which are available under the [SIL Open Font License (OFL)](https://scripts.sil.org/OFL). -The template can be found [here](https://git.undefinedbehavior.de/undef/undefined-pelican-theme "Undefined Pelican Theme"). +## reset.css + +Like many other websites, this site relies on [reset.css](http://meyerweb.com/eric/tools/css/reset/) (public domain) to remove browser-side default CSS settings. + +_Thank you very much._ diff --git a/content/pages/found.md b/content/pages/found.md index 3433609..e5bd410 100644 --- a/content/pages/found.md +++ b/content/pages/found.md @@ -1,20 +1,16 @@ Title: Lost and Found -Date: 2023-04-25 10:15 +Date: 2023-10-21 20:40 Author: Error Slug: found Status: hidden -Summary: Looks like you found something I may have lost and you want to return it to me. Thank you very much. +Summary: If you see this page, you probably found something I've lost +Hidemeta: True -## Thank you - -You seem to have found something I've lost and are trying to return it to me. -Thank you very much. - -## How to contact me - -Please let me know what you found and where it is. +You seem to have found something I've lost. +Please let me know what you found and where I can find it. If I'm at a chaos event, you can probably reach me via my DECT. Usually, my number is 7303. - Other options for contacting me are listed on my [contact page](/contact "Contact"), including e-mail and my fedi account. + +_Thank you very much_ diff --git a/content/pages/imprint.md b/content/pages/imprint.md index f37c5dd..7c84139 100644 --- a/content/pages/imprint.md +++ b/content/pages/imprint.md @@ -2,11 +2,8 @@ Title: Imprint Date: 2022-08-28 16:05 Author: Error Status: hidden -Summary: Legaly required contact information - -## Disclaimer - -This information is only provided for legal reasons. Please reach out to me via [e-mail or fedi](/contact "Contact") instead. It's much faster and simpler. +Summary: Legally required contact information +Hidemeta: True ## Verantwortlich gemäß §5 TMG @@ -14,3 +11,7 @@ This information is only provided for legal reasons. Please reach out to me via Heilmannstraße 4b 70190 Stuttgart Germany + +This information is only provided for legal reasons. +Please reach out to me via [e-mail or fedi](/contact "Contact") instead. +It's much faster and simpler. diff --git a/content/pages/privacy.md b/content/pages/privacy.md index 0e0de54..b557af3 100644 --- a/content/pages/privacy.md +++ b/content/pages/privacy.md @@ -3,6 +3,7 @@ Date: 2022-08-28 16:05 Author: Error Status: hidden Summary: Only necessary data is processed. No logging, no tracking, no analytics; +Hidemeta: True ## Privacy Statement diff --git a/filters.py b/filters.py index dd9d322..893799c 100644 --- a/filters.py +++ b/filters.py @@ -1,43 +1,6 @@ -def add_lightboxes(html: str, - lightbox_class: str = "lightbox", - wrapper_class: str = "lightbox-wrapper") -> str: - counter: int = 0 - img_start: int = html.find(" -1: - counter += 1 - img_end: int = html.find(">", img_start + 4) - lightbox: str = f"\n" +\ - f"\n" - if html[img_start - 3:img_start] == "
" and html[img_end + 1:img_end + 5] == "
": - img_start -= 3 - img_end += 4 - html = html[:img_start] + lightbox + html[img_end + 1:] - img_start = html.find(" str: + label_class: str = "sidenote-number") -> str: counter: int = 0 start: int = html.find("[°") while start > -1: @@ -46,7 +9,7 @@ def add_sidenotes(html: str, text: str = html[start + 2:end] sidenote: str = f"\n" +\ f"\n" +\ - f"\n" +\ + f"\n" +\ f" {text}\n" +\ f"\n" html = html[:start] + sidenote + html[end + 1:] diff --git a/pelicanconf.py b/pelicanconf.py index a2ffccf..0581bdb 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -1,57 +1,65 @@ from sys import path from os import curdir path.append(curdir) -from filters import add_lightboxes, add_sidenotes +from filters import add_sidenotes from datetime import date DATE = str(date.today()) -AUTHOR = 'Error' -SITENAME = 'Undefined Behavior' -SITEURL = '' -ABSTRACT = "If, as Adam Savage famously put it, the only difference between screwing around and science is writing it down, I should probably write about my projects somewhere. I'll just do it here." -FAVICON = 'favicon.svg' +# General Settings +AUTHOR = 'error' +SITENAME = 'Undefined