From 7f37518e4792f040a753a5d8d68d51e76cc0b2be Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Sat, 13 Jul 2024 17:55:47 -0400 Subject: Initial migration to org-reader Long-term I would like to merge the =posts-assets= and =posts= directories but currently Haunt will crash if something exists in the =posts= directory that can't be processed by a reader --- haunt/.gitignore | 1 + haunt/haunt.scm | 6 +- haunt/jakob/reader/org-mode-prime.scm | 36 ++ haunt/jakob/reader/org-mode.scm | 12 +- haunt/jakob/utils.scm | 22 +- haunt/posts-assets/Lisp Kludge.png | Bin 0 -> 359511 bytes haunt/posts-assets/MyrddinHeap.svg | 694 +++++++++++++++++++++ haunt/posts-assets/bad-behavior-debug-prints.png | Bin 0 -> 2108 bytes .../bad-behavior-vanilla-hexen-vulnerability.png | Bin 0 -> 82603 bytes ...dollar-bin-reverse-engineering-firmware-mod.jpg | Bin 0 -> 89507 bytes .../dollar-bin-reverse-engineering-m2.jpg | Bin 0 -> 94065 bytes .../dollar-bin-reverse-engineering-mac.jpg | Bin 0 -> 41466 bytes .../dollar-bin-reverse-engineering-manual.jpg | Bin 0 -> 81706 bytes haunt/posts-assets/flipper-zero-hello-world.jpg | Bin 0 -> 47620 bytes haunt/posts-assets/forge-1-1.png | Bin 0 -> 76319 bytes haunt/posts-assets/forge-1-2.png | Bin 0 -> 76837 bytes haunt/posts-assets/forge-1-3.png | Bin 0 -> 52219 bytes haunt/posts-assets/forge-1-4.png | Bin 0 -> 53208 bytes haunt/posts-assets/gtkcord4-on-pinephone.png | Bin 0 -> 220103 bytes haunt/posts-assets/kona-1.jpg | Bin 0 -> 82999 bytes haunt/posts-assets/kona-2.jpg | Bin 0 -> 147421 bytes haunt/posts-assets/kona-3.jpg | Bin 0 -> 271865 bytes haunt/posts-assets/kona-4.jpg | Bin 0 -> 292957 bytes haunt/posts-assets/lisp-personality-test.png | Bin 0 -> 7045 bytes haunt/posts-assets/logo.png | Bin 0 -> 70229 bytes ...ing-your-own-music-player-analog-vs-digital.png | Bin 0 -> 11919 bytes haunt/posts-assets/mitmproxy-initial.png | Bin 0 -> 54663 bytes haunt/posts-assets/music-on-zeta.png | Bin 0 -> 61660 bytes haunt/posts-assets/old-webmention-screenshot.png | Bin 0 -> 109830 bytes haunt/posts-assets/openxcom-on-pinephone.png | Bin 0 -> 296489 bytes haunt/posts-assets/pinephone-1.jpg | Bin 0 -> 345804 bytes haunt/posts-assets/pinephone-2.jpg | Bin 0 -> 423256 bytes haunt/posts-assets/pinephone-3.jpg | Bin 0 -> 593380 bytes haunt/posts-assets/pinephone-4.jpg | Bin 0 -> 724410 bytes haunt/posts-assets/pinephone-5.jpg | Bin 0 -> 320325 bytes haunt/posts-assets/pinephone-6.jpg | Bin 0 -> 1031623 bytes haunt/posts-assets/pinephone-7.jpg | Bin 0 -> 47011 bytes haunt/posts-assets/pinephone-running-emacs.png | Bin 0 -> 205622 bytes haunt/posts-assets/pinephone-running-mpv.png | Bin 0 -> 255017 bytes haunt/posts-assets/ret2emacs-overlay-demo.png | Bin 0 -> 2104 bytes ...g-babbys-first-archive-format-basic-parsing.png | Bin 0 -> 15718 bytes ...ing-babbys-first-archive-format-binary-dump.png | Bin 0 -> 61514 bytes ...ys-first-archive-format-catching-file-reads.png | Bin 0 -> 407274 bytes ...ring-babbys-first-archive-format-xp3-header.png | Bin 0 -> 9290 bytes haunt/posts-assets/rsvp-screenshot.png | Bin 0 -> 86931 bytes .../sdl-tutorial-part-0x00-finished-window.png | Bin 0 -> 11966 bytes .../posts-assets/sdl-tutorial-part-0x00-window.png | Bin 0 -> 9405 bytes haunt/posts-assets/shellbot-propagation.jpg | Bin 0 -> 427743 bytes ...-my-usb-drivers-before-i-can-play-wireshark.png | Bin 0 -> 261565 bytes haunt/posts-assets/tunes-on-home-screen.png | Bin 0 -> 332347 bytes haunt/posts-assets/tunes-on-pinephone.png | Bin 0 -> 208116 bytes haunt/posts-assets/tunes-on-workstation.png | Bin 0 -> 364407 bytes haunt/posts-assets/umass-ctf-2021-postmortem-1.png | Bin 0 -> 13180 bytes haunt/posts-assets/umass-ctf-2021-postmortem-2.png | Bin 0 -> 32415 bytes haunt/posts-assets/warp-mvp.png | Bin 0 -> 15562 bytes haunt/posts-assets/web-server-traffic.jpg | Bin 0 -> 79557 bytes haunt/posts/bad-behavior.org | 4 +- haunt/posts/making-your-own-music-player.org | 2 +- ...rse-engineering-babbys-first-archive-format.org | 8 +- haunt/posts/sdl-tutorial-part-0x00.org | 4 +- haunt/static/image/Lisp Kludge.png | Bin 359511 -> 0 bytes haunt/static/image/MyrddinHeap.svg | 694 --------------------- haunt/static/image/bad-behavior-debug-prints.png | Bin 2108 -> 0 bytes .../bad-behavior-vanilla-hexen-vulnerability.png | Bin 82603 -> 0 bytes ...dollar-bin-reverse-engineering-firmware-mod.jpg | Bin 89507 -> 0 bytes .../image/dollar-bin-reverse-engineering-m2.jpg | Bin 94065 -> 0 bytes .../image/dollar-bin-reverse-engineering-mac.jpg | Bin 41466 -> 0 bytes .../dollar-bin-reverse-engineering-manual.jpg | Bin 81706 -> 0 bytes haunt/static/image/lisp-personality-test.png | Bin 7045 -> 0 bytes ...ing-your-own-music-player-analog-vs-digital.png | Bin 11919 -> 0 bytes haunt/static/image/mitmproxy-initial.png | Bin 54663 -> 0 bytes haunt/static/image/ret2emacs-overlay-demo.png | Bin 2104 -> 0 bytes ...g-babbys-first-archive-format-basic-parsing.png | Bin 15718 -> 0 bytes ...ing-babbys-first-archive-format-binary-dump.png | Bin 61514 -> 0 bytes ...ys-first-archive-format-catching-file-reads.png | Bin 407274 -> 0 bytes ...ring-babbys-first-archive-format-xp3-header.png | Bin 9290 -> 0 bytes .../sdl-tutorial-part-0x00-finished-window.png | Bin 11966 -> 0 bytes .../static/image/sdl-tutorial-part-0x00-window.png | Bin 9405 -> 0 bytes haunt/static/image/shellbot-propagation.jpg | Bin 427743 -> 0 bytes ...-my-usb-drivers-before-i-can-play-wireshark.png | Bin 261565 -> 0 bytes haunt/static/image/umass-ctf-2021-postmortem-1.png | Bin 13180 -> 0 bytes haunt/static/image/umass-ctf-2021-postmortem-2.png | Bin 32415 -> 0 bytes 82 files changed, 767 insertions(+), 716 deletions(-) create mode 100644 haunt/.gitignore create mode 100644 haunt/jakob/reader/org-mode-prime.scm create mode 100644 haunt/posts-assets/Lisp Kludge.png create mode 100644 haunt/posts-assets/MyrddinHeap.svg create mode 100644 haunt/posts-assets/bad-behavior-debug-prints.png create mode 100644 haunt/posts-assets/bad-behavior-vanilla-hexen-vulnerability.png create mode 100644 haunt/posts-assets/dollar-bin-reverse-engineering-firmware-mod.jpg create mode 100644 haunt/posts-assets/dollar-bin-reverse-engineering-m2.jpg create mode 100644 haunt/posts-assets/dollar-bin-reverse-engineering-mac.jpg create mode 100644 haunt/posts-assets/dollar-bin-reverse-engineering-manual.jpg create mode 100644 haunt/posts-assets/flipper-zero-hello-world.jpg create mode 100644 haunt/posts-assets/forge-1-1.png create mode 100644 haunt/posts-assets/forge-1-2.png create mode 100644 haunt/posts-assets/forge-1-3.png create mode 100644 haunt/posts-assets/forge-1-4.png create mode 100644 haunt/posts-assets/gtkcord4-on-pinephone.png create mode 100644 haunt/posts-assets/kona-1.jpg create mode 100644 haunt/posts-assets/kona-2.jpg create mode 100644 haunt/posts-assets/kona-3.jpg create mode 100644 haunt/posts-assets/kona-4.jpg create mode 100644 haunt/posts-assets/lisp-personality-test.png create mode 100644 haunt/posts-assets/logo.png create mode 100644 haunt/posts-assets/making-your-own-music-player-analog-vs-digital.png create mode 100644 haunt/posts-assets/mitmproxy-initial.png create mode 100644 haunt/posts-assets/music-on-zeta.png create mode 100644 haunt/posts-assets/old-webmention-screenshot.png create mode 100644 haunt/posts-assets/openxcom-on-pinephone.png create mode 100644 haunt/posts-assets/pinephone-1.jpg create mode 100644 haunt/posts-assets/pinephone-2.jpg create mode 100644 haunt/posts-assets/pinephone-3.jpg create mode 100644 haunt/posts-assets/pinephone-4.jpg create mode 100644 haunt/posts-assets/pinephone-5.jpg create mode 100644 haunt/posts-assets/pinephone-6.jpg create mode 100644 haunt/posts-assets/pinephone-7.jpg create mode 100644 haunt/posts-assets/pinephone-running-emacs.png create mode 100644 haunt/posts-assets/pinephone-running-mpv.png create mode 100644 haunt/posts-assets/ret2emacs-overlay-demo.png create mode 100644 haunt/posts-assets/reverse-engineering-babbys-first-archive-format-basic-parsing.png create mode 100644 haunt/posts-assets/reverse-engineering-babbys-first-archive-format-binary-dump.png create mode 100644 haunt/posts-assets/reverse-engineering-babbys-first-archive-format-catching-file-reads.png create mode 100644 haunt/posts-assets/reverse-engineering-babbys-first-archive-format-xp3-header.png create mode 100644 haunt/posts-assets/rsvp-screenshot.png create mode 100644 haunt/posts-assets/sdl-tutorial-part-0x00-finished-window.png create mode 100644 haunt/posts-assets/sdl-tutorial-part-0x00-window.png create mode 100644 haunt/posts-assets/shellbot-propagation.jpg create mode 100644 haunt/posts-assets/sorry-guys-i-have-to-troubleshoot-my-usb-drivers-before-i-can-play-wireshark.png create mode 100644 haunt/posts-assets/tunes-on-home-screen.png create mode 100644 haunt/posts-assets/tunes-on-pinephone.png create mode 100644 haunt/posts-assets/tunes-on-workstation.png create mode 100644 haunt/posts-assets/umass-ctf-2021-postmortem-1.png create mode 100644 haunt/posts-assets/umass-ctf-2021-postmortem-2.png create mode 100644 haunt/posts-assets/warp-mvp.png create mode 100644 haunt/posts-assets/web-server-traffic.jpg delete mode 100644 haunt/static/image/Lisp Kludge.png delete mode 100644 haunt/static/image/MyrddinHeap.svg delete mode 100644 haunt/static/image/bad-behavior-debug-prints.png delete mode 100644 haunt/static/image/bad-behavior-vanilla-hexen-vulnerability.png delete mode 100644 haunt/static/image/dollar-bin-reverse-engineering-firmware-mod.jpg delete mode 100644 haunt/static/image/dollar-bin-reverse-engineering-m2.jpg delete mode 100644 haunt/static/image/dollar-bin-reverse-engineering-mac.jpg delete mode 100644 haunt/static/image/dollar-bin-reverse-engineering-manual.jpg delete mode 100644 haunt/static/image/lisp-personality-test.png delete mode 100644 haunt/static/image/making-your-own-music-player-analog-vs-digital.png delete mode 100644 haunt/static/image/mitmproxy-initial.png delete mode 100644 haunt/static/image/ret2emacs-overlay-demo.png delete mode 100644 haunt/static/image/reverse-engineering-babbys-first-archive-format-basic-parsing.png delete mode 100644 haunt/static/image/reverse-engineering-babbys-first-archive-format-binary-dump.png delete mode 100644 haunt/static/image/reverse-engineering-babbys-first-archive-format-catching-file-reads.png delete mode 100644 haunt/static/image/reverse-engineering-babbys-first-archive-format-xp3-header.png delete mode 100644 haunt/static/image/sdl-tutorial-part-0x00-finished-window.png delete mode 100644 haunt/static/image/sdl-tutorial-part-0x00-window.png delete mode 100644 haunt/static/image/shellbot-propagation.jpg delete mode 100644 haunt/static/image/sorry-guys-i-have-to-troubleshoot-my-usb-drivers-before-i-can-play-wireshark.png delete mode 100644 haunt/static/image/umass-ctf-2021-postmortem-1.png delete mode 100644 haunt/static/image/umass-ctf-2021-postmortem-2.png diff --git a/haunt/.gitignore b/haunt/.gitignore new file mode 100644 index 0000000..17935b4 --- /dev/null +++ b/haunt/.gitignore @@ -0,0 +1 @@ +.org-mode-reader-cache/ diff --git a/haunt/haunt.scm b/haunt/haunt.scm index 6d2aacb..1d24fe9 100644 --- a/haunt/haunt.scm +++ b/haunt/haunt.scm @@ -25,6 +25,7 @@ (jakob builder htaccess) (jakob builder outbox) (jakob reader html-prime) + (jakob reader org-mode-prime) (jakob theme) (srfi srfi-19) (srfi srfi-26)) @@ -45,7 +46,7 @@ '((author . "Jakob L. Kreuze") (email . "zerodaysfordays@sdf.lonestar.org")) #:make-slug post-slug-v2 - #:readers (list html-reader-prime org-mode-reader sxml-reader) + #:readers (list html-reader-prime org-mode-reader-prime sxml-reader) #:builders (list (atom-feed #:max-entries 1024) (blog) @@ -60,4 +61,5 @@ #:template (lambda (_site title content) (theme #:title title #:content content)) #:prefix "pages/") - (static-directory "static"))) + (static-directory "static") + (static-directory "posts-assets" "blog"))) diff --git a/haunt/jakob/reader/org-mode-prime.scm b/haunt/jakob/reader/org-mode-prime.scm new file mode 100644 index 0000000..118f1a6 --- /dev/null +++ b/haunt/jakob/reader/org-mode-prime.scm @@ -0,0 +1,36 @@ +;;; Copyright © 2019 - 2024 Jakob L. Kreuze +;;; +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License as +;;; published by the Free Software Foundation; either version 3 of the +;;; License, or (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see +;;; . + +;;; Commentary: +;;; +;;; Wrapper around the `org-mode-reader' to apply rewrite rules specific to my +;;; website. +;;; +;;; Code: + +(define-module (jakob reader org-mode-prime) + #:use-module (haunt reader) + #:use-module (jakob reader org-mode) + #:use-module (jakob utils sxml) + #:use-module (srfi srfi-11) + #:export (org-mode-reader-prime)) + +(define org-mode-reader-prime + (make-reader (reader-matcher org-mode-reader) + (lambda args + (let-values (((metadata sxml) (apply (reader-proc org-mode-reader) args))) + (values metadata + (rewrite-absolute-urls-as-relative sxml)))))) diff --git a/haunt/jakob/reader/org-mode.scm b/haunt/jakob/reader/org-mode.scm index 7f064f1..b55dbf3 100644 --- a/haunt/jakob/reader/org-mode.scm +++ b/haunt/jakob/reader/org-mode.scm @@ -49,6 +49,10 @@ (or (getenv "HAUNT_ORG_READER_CACHE_DIR") "./.org-mode-reader-cache/")))) +;; File name of Elisp script to execute before anything else +(define %additional-emacs-preamble + (make-parameter (getenv "HAUNT_ORG_READER_EMACS_PREAMBLE"))) + ;; Additional Org-mode keywords to include in the extracted metadata. (define %additional-keys (make-parameter '("CROSSPOST" "SCRIPTS" "META-TAGS"))) @@ -62,7 +66,13 @@ If `%use-emacsclient' is truthy, evaluate FORM in the current running Emacs daemon. Assumes that FORM does not write to `standard-output'." - (let* (;; We need to explicitly request that Emacs write the result if using + (let* (;; If `HAUNT_ORG_READER_PREAMBLE' is specified, load that. + (form (if (%additional-emacs-preamble) + `(progn + (load-file ,(%additional-emacs-preamble)) + ,form) + form)) + ;; We need to explicitly request that Emacs write the result if using ;; Emacs batch mode (which is how we evaluate forms without ;; `emacsclient'.) (form (if (not (%use-emacsclient)) diff --git a/haunt/jakob/utils.scm b/haunt/jakob/utils.scm index a104510..ad35f4c 100644 --- a/haunt/jakob/utils.scm +++ b/haunt/jakob/utils.scm @@ -19,7 +19,8 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) - #:export (maybe-cons* + #:export (assq-map! + maybe-cons* maybe-list date->string* intersperse @@ -28,6 +29,12 @@ elide-string)) +(define (assq-map! alist key fn) + "Destructively apply FN to KEY in ALIST, if it exists" + (match (assq-ref alist key) + (#f alist) + (val (assq-set! alist key (fn val))))) + (define (maybe-list . args) "Create a list of all ARGS that are neither #f nor unspecified." (remove (lambda (element) @@ -62,16 +69,11 @@ is of an odd length and every second element is DELIM." content))) (define (first-paragraph post) - (let loop ((sxml (post-sxml post)) - (result '())) + (let loop ((sxml (post-sxml post))) (match sxml - (() (remove-footnote-references (reverse result))) - ((or (('p ...) tail ...) (paragraph tail ...)) - (if (and (list? paragraph) (eqv? 'header (car paragraph))) - (loop tail result) ; Ignore front-matter. - (remove-footnote-references (reverse (cons paragraph result))))) - ((head . tail) - (loop tail (cons head result)))))) + (((and ('p content ...) paragraph) . tail) + (remove-footnote-references paragraph)) + ((head . tail) (loop tail))))) (define (description-from-post post) (define (first-elem sxml) diff --git a/haunt/posts-assets/Lisp Kludge.png b/haunt/posts-assets/Lisp Kludge.png new file mode 100644 index 0000000..9c244b9 Binary files /dev/null and b/haunt/posts-assets/Lisp Kludge.png differ diff --git a/haunt/posts-assets/MyrddinHeap.svg b/haunt/posts-assets/MyrddinHeap.svg new file mode 100644 index 0000000..b5261bf --- /dev/null +++ b/haunt/posts-assets/MyrddinHeap.svg @@ -0,0 +1,694 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/haunt/posts-assets/bad-behavior-debug-prints.png b/haunt/posts-assets/bad-behavior-debug-prints.png new file mode 100644 index 0000000..538ccec Binary files /dev/null and b/haunt/posts-assets/bad-behavior-debug-prints.png differ diff --git a/haunt/posts-assets/bad-behavior-vanilla-hexen-vulnerability.png b/haunt/posts-assets/bad-behavior-vanilla-hexen-vulnerability.png new file mode 100644 index 0000000..510cf5f Binary files /dev/null and b/haunt/posts-assets/bad-behavior-vanilla-hexen-vulnerability.png differ diff --git a/haunt/posts-assets/dollar-bin-reverse-engineering-firmware-mod.jpg b/haunt/posts-assets/dollar-bin-reverse-engineering-firmware-mod.jpg new file mode 100644 index 0000000..0b2302e Binary files /dev/null and b/haunt/posts-assets/dollar-bin-reverse-engineering-firmware-mod.jpg differ diff --git a/haunt/posts-assets/dollar-bin-reverse-engineering-m2.jpg b/haunt/posts-assets/dollar-bin-reverse-engineering-m2.jpg new file mode 100644 index 0000000..25aefdb Binary files /dev/null and b/haunt/posts-assets/dollar-bin-reverse-engineering-m2.jpg differ diff --git a/haunt/posts-assets/dollar-bin-reverse-engineering-mac.jpg b/haunt/posts-assets/dollar-bin-reverse-engineering-mac.jpg new file mode 100644 index 0000000..2c66f31 Binary files /dev/null and b/haunt/posts-assets/dollar-bin-reverse-engineering-mac.jpg differ diff --git a/haunt/posts-assets/dollar-bin-reverse-engineering-manual.jpg b/haunt/posts-assets/dollar-bin-reverse-engineering-manual.jpg new file mode 100644 index 0000000..731735a Binary files /dev/null and b/haunt/posts-assets/dollar-bin-reverse-engineering-manual.jpg differ diff --git a/haunt/posts-assets/flipper-zero-hello-world.jpg b/haunt/posts-assets/flipper-zero-hello-world.jpg new file mode 100644 index 0000000..c072316 Binary files /dev/null and b/haunt/posts-assets/flipper-zero-hello-world.jpg differ diff --git a/haunt/posts-assets/forge-1-1.png b/haunt/posts-assets/forge-1-1.png new file mode 100644 index 0000000..0fbe29e Binary files /dev/null and b/haunt/posts-assets/forge-1-1.png differ diff --git a/haunt/posts-assets/forge-1-2.png b/haunt/posts-assets/forge-1-2.png new file mode 100644 index 0000000..9196000 Binary files /dev/null and b/haunt/posts-assets/forge-1-2.png differ diff --git a/haunt/posts-assets/forge-1-3.png b/haunt/posts-assets/forge-1-3.png new file mode 100644 index 0000000..634939c Binary files /dev/null and b/haunt/posts-assets/forge-1-3.png differ diff --git a/haunt/posts-assets/forge-1-4.png b/haunt/posts-assets/forge-1-4.png new file mode 100644 index 0000000..da6832e Binary files /dev/null and b/haunt/posts-assets/forge-1-4.png differ diff --git a/haunt/posts-assets/gtkcord4-on-pinephone.png b/haunt/posts-assets/gtkcord4-on-pinephone.png new file mode 100644 index 0000000..45cb2b3 Binary files /dev/null and b/haunt/posts-assets/gtkcord4-on-pinephone.png differ diff --git a/haunt/posts-assets/kona-1.jpg b/haunt/posts-assets/kona-1.jpg new file mode 100644 index 0000000..79d40dc Binary files /dev/null and b/haunt/posts-assets/kona-1.jpg differ diff --git a/haunt/posts-assets/kona-2.jpg b/haunt/posts-assets/kona-2.jpg new file mode 100644 index 0000000..4ce3d51 Binary files /dev/null and b/haunt/posts-assets/kona-2.jpg differ diff --git a/haunt/posts-assets/kona-3.jpg b/haunt/posts-assets/kona-3.jpg new file mode 100644 index 0000000..16d2b2c Binary files /dev/null and b/haunt/posts-assets/kona-3.jpg differ diff --git a/haunt/posts-assets/kona-4.jpg b/haunt/posts-assets/kona-4.jpg new file mode 100644 index 0000000..19e7af9 Binary files /dev/null and b/haunt/posts-assets/kona-4.jpg differ diff --git a/haunt/posts-assets/lisp-personality-test.png b/haunt/posts-assets/lisp-personality-test.png new file mode 100644 index 0000000..c3a26f3 Binary files /dev/null and b/haunt/posts-assets/lisp-personality-test.png differ diff --git a/haunt/posts-assets/logo.png b/haunt/posts-assets/logo.png new file mode 100644 index 0000000..8898c6d Binary files /dev/null and b/haunt/posts-assets/logo.png differ diff --git a/haunt/posts-assets/making-your-own-music-player-analog-vs-digital.png b/haunt/posts-assets/making-your-own-music-player-analog-vs-digital.png new file mode 100644 index 0000000..6841598 Binary files /dev/null and b/haunt/posts-assets/making-your-own-music-player-analog-vs-digital.png differ diff --git a/haunt/posts-assets/mitmproxy-initial.png b/haunt/posts-assets/mitmproxy-initial.png new file mode 100644 index 0000000..3b022e7 Binary files /dev/null and b/haunt/posts-assets/mitmproxy-initial.png differ diff --git a/haunt/posts-assets/music-on-zeta.png b/haunt/posts-assets/music-on-zeta.png new file mode 100644 index 0000000..f48d984 Binary files /dev/null and b/haunt/posts-assets/music-on-zeta.png differ diff --git a/haunt/posts-assets/old-webmention-screenshot.png b/haunt/posts-assets/old-webmention-screenshot.png new file mode 100644 index 0000000..6c4f015 Binary files /dev/null and b/haunt/posts-assets/old-webmention-screenshot.png differ diff --git a/haunt/posts-assets/openxcom-on-pinephone.png b/haunt/posts-assets/openxcom-on-pinephone.png new file mode 100644 index 0000000..a7e383e Binary files /dev/null and b/haunt/posts-assets/openxcom-on-pinephone.png differ diff --git a/haunt/posts-assets/pinephone-1.jpg b/haunt/posts-assets/pinephone-1.jpg new file mode 100644 index 0000000..2577260 Binary files /dev/null and b/haunt/posts-assets/pinephone-1.jpg differ diff --git a/haunt/posts-assets/pinephone-2.jpg b/haunt/posts-assets/pinephone-2.jpg new file mode 100644 index 0000000..524e93d Binary files /dev/null and b/haunt/posts-assets/pinephone-2.jpg differ diff --git a/haunt/posts-assets/pinephone-3.jpg b/haunt/posts-assets/pinephone-3.jpg new file mode 100644 index 0000000..3a26eb3 Binary files /dev/null and b/haunt/posts-assets/pinephone-3.jpg differ diff --git a/haunt/posts-assets/pinephone-4.jpg b/haunt/posts-assets/pinephone-4.jpg new file mode 100644 index 0000000..fc7051b Binary files /dev/null and b/haunt/posts-assets/pinephone-4.jpg differ diff --git a/haunt/posts-assets/pinephone-5.jpg b/haunt/posts-assets/pinephone-5.jpg new file mode 100644 index 0000000..bb8e59b Binary files /dev/null and b/haunt/posts-assets/pinephone-5.jpg differ diff --git a/haunt/posts-assets/pinephone-6.jpg b/haunt/posts-assets/pinephone-6.jpg new file mode 100644 index 0000000..13cbb00 Binary files /dev/null and b/haunt/posts-assets/pinephone-6.jpg differ diff --git a/haunt/posts-assets/pinephone-7.jpg b/haunt/posts-assets/pinephone-7.jpg new file mode 100644 index 0000000..8af4519 Binary files /dev/null and b/haunt/posts-assets/pinephone-7.jpg differ diff --git a/haunt/posts-assets/pinephone-running-emacs.png b/haunt/posts-assets/pinephone-running-emacs.png new file mode 100644 index 0000000..86e7692 Binary files /dev/null and b/haunt/posts-assets/pinephone-running-emacs.png differ diff --git a/haunt/posts-assets/pinephone-running-mpv.png b/haunt/posts-assets/pinephone-running-mpv.png new file mode 100644 index 0000000..5cb71b5 Binary files /dev/null and b/haunt/posts-assets/pinephone-running-mpv.png differ diff --git a/haunt/posts-assets/ret2emacs-overlay-demo.png b/haunt/posts-assets/ret2emacs-overlay-demo.png new file mode 100644 index 0000000..70c6c8e Binary files /dev/null and b/haunt/posts-assets/ret2emacs-overlay-demo.png differ diff --git a/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-basic-parsing.png b/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-basic-parsing.png new file mode 100644 index 0000000..0513350 Binary files /dev/null and b/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-basic-parsing.png differ diff --git a/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-binary-dump.png b/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-binary-dump.png new file mode 100644 index 0000000..0a8774c Binary files /dev/null and b/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-binary-dump.png differ diff --git a/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-catching-file-reads.png b/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-catching-file-reads.png new file mode 100644 index 0000000..2ce8f62 Binary files /dev/null and b/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-catching-file-reads.png differ diff --git a/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-xp3-header.png b/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-xp3-header.png new file mode 100644 index 0000000..0fac996 Binary files /dev/null and b/haunt/posts-assets/reverse-engineering-babbys-first-archive-format-xp3-header.png differ diff --git a/haunt/posts-assets/rsvp-screenshot.png b/haunt/posts-assets/rsvp-screenshot.png new file mode 100644 index 0000000..9e18992 Binary files /dev/null and b/haunt/posts-assets/rsvp-screenshot.png differ diff --git a/haunt/posts-assets/sdl-tutorial-part-0x00-finished-window.png b/haunt/posts-assets/sdl-tutorial-part-0x00-finished-window.png new file mode 100644 index 0000000..4e9a146 Binary files /dev/null and b/haunt/posts-assets/sdl-tutorial-part-0x00-finished-window.png differ diff --git a/haunt/posts-assets/sdl-tutorial-part-0x00-window.png b/haunt/posts-assets/sdl-tutorial-part-0x00-window.png new file mode 100644 index 0000000..0bbe5fc Binary files /dev/null and b/haunt/posts-assets/sdl-tutorial-part-0x00-window.png differ diff --git a/haunt/posts-assets/shellbot-propagation.jpg b/haunt/posts-assets/shellbot-propagation.jpg new file mode 100644 index 0000000..342364c Binary files /dev/null and b/haunt/posts-assets/shellbot-propagation.jpg differ diff --git a/haunt/posts-assets/sorry-guys-i-have-to-troubleshoot-my-usb-drivers-before-i-can-play-wireshark.png b/haunt/posts-assets/sorry-guys-i-have-to-troubleshoot-my-usb-drivers-before-i-can-play-wireshark.png new file mode 100644 index 0000000..2d993af Binary files /dev/null and b/haunt/posts-assets/sorry-guys-i-have-to-troubleshoot-my-usb-drivers-before-i-can-play-wireshark.png differ diff --git a/haunt/posts-assets/tunes-on-home-screen.png b/haunt/posts-assets/tunes-on-home-screen.png new file mode 100644 index 0000000..7cd1dc0 Binary files /dev/null and b/haunt/posts-assets/tunes-on-home-screen.png differ diff --git a/haunt/posts-assets/tunes-on-pinephone.png b/haunt/posts-assets/tunes-on-pinephone.png new file mode 100644 index 0000000..06441a8 Binary files /dev/null and b/haunt/posts-assets/tunes-on-pinephone.png differ diff --git a/haunt/posts-assets/tunes-on-workstation.png b/haunt/posts-assets/tunes-on-workstation.png new file mode 100644 index 0000000..1501d64 Binary files /dev/null and b/haunt/posts-assets/tunes-on-workstation.png differ diff --git a/haunt/posts-assets/umass-ctf-2021-postmortem-1.png b/haunt/posts-assets/umass-ctf-2021-postmortem-1.png new file mode 100644 index 0000000..1bee126 Binary files /dev/null and b/haunt/posts-assets/umass-ctf-2021-postmortem-1.png differ diff --git a/haunt/posts-assets/umass-ctf-2021-postmortem-2.png b/haunt/posts-assets/umass-ctf-2021-postmortem-2.png new file mode 100644 index 0000000..7f12ad1 Binary files /dev/null and b/haunt/posts-assets/umass-ctf-2021-postmortem-2.png differ diff --git a/haunt/posts-assets/warp-mvp.png b/haunt/posts-assets/warp-mvp.png new file mode 100644 index 0000000..14c7f0b Binary files /dev/null and b/haunt/posts-assets/warp-mvp.png differ diff --git a/haunt/posts-assets/web-server-traffic.jpg b/haunt/posts-assets/web-server-traffic.jpg new file mode 100644 index 0000000..f24ea09 Binary files /dev/null and b/haunt/posts-assets/web-server-traffic.jpg differ diff --git a/haunt/posts/bad-behavior.org b/haunt/posts/bad-behavior.org index a5c9dbe..a8658ff 100644 --- a/haunt/posts/bad-behavior.org +++ b/haunt/posts/bad-behavior.org @@ -157,7 +157,7 @@ about in a little bit. Let's jump in and craft a BEHAVIOR lump which calls =PUSHBYTE= a bunch of times. #+CAPTION: A screenshot of my terminal showing an abrupt end to the debug prints I added for inspecting the absolute memory addresses of SStack and VStack. -[[./debug-prints.png]] +[[./bad-behavior-debug-prints.png]] We seem to end prematurely, which is because we hit the stack pointer. We will have to modify our exploit to step over it somehow, which we can do by @@ -185,4 +185,4 @@ disclosing this to the development team, we discovered that vanilla Hexen has this same arbitrary code execution vulnerability. No proof-of-concept yet. #+CAPTION: One of my posts in an internal discussion on the GZDoom forums regarding the same exploit existing in the vanilla Hexen code. -[[./vanilla-hexen-vulnerability.png]] +[[./bad-behavior-vanilla-hexen-vulnerability.png]] diff --git a/haunt/posts/making-your-own-music-player.org b/haunt/posts/making-your-own-music-player.org index cf5cbac..f96d4a5 100644 --- a/haunt/posts/making-your-own-music-player.org +++ b/haunt/posts/making-your-own-music-player.org @@ -26,7 +26,7 @@ instantaneous representation of the signal some number of times a second. The image below does a good job of explaining it, I think. #+CAPTION: Diagram showing the difference between an analog sine wave and a quantization of that wave. -[[./analog-vs-digital.png]] +[[./making-your-own-music-player-analog-vs-digital.png]] The rate at which the signal is sampled or quantized is the *frequency*. 44.1 kHz is typically the standard - meanining that 441,000 samples are taken every diff --git a/haunt/posts/reverse-engineering-babbys-first-archive-format.org b/haunt/posts/reverse-engineering-babbys-first-archive-format.org index 1f69b5a..d817e30 100644 --- a/haunt/posts/reverse-engineering-babbys-first-archive-format.org +++ b/haunt/posts/reverse-engineering-babbys-first-archive-format.org @@ -24,7 +24,7 @@ editor and went at it, with the [[https://github.com/vn-tools/arc_unpacker/blob/ it. #+CAPTION: A hex dump of the XP3 header. -[[./xp3-header.png]] +[[./reverse-engineering-babbys-first-archive-format-xp3-header.png]] The first section of the archive is the header. It begins with an 11-byte "magic number," used by whatever program is opening it as a sanity check. It's @@ -59,7 +59,7 @@ Huffman Coding, so let's use zlib! I proceeded to inflate the archive contents according to the header and dumped it so that I could view it in my hex editor. #+CAPTION: Sections in the hexdump of the decompressed payload with the corresponding constants in the Arc source code. -[[./binary-dump.png]] +[[./reverse-engineering-babbys-first-archive-format-binary-dump.png]] Every entry has a header containing a 32-bit magic number (underlined in red), followed by a 64-bit unsigned integer representing the size of the entry. It's a @@ -80,7 +80,7 @@ a compressed and decompressed size, and what seems to be an MD5 hash of the file. #+CAPTION: A screenshot of my terminal, showing the output of a bare-bones parser for the format. -[[./basic-parsing.png]] +[[./reverse-engineering-babbys-first-archive-format-basic-parsing.png]] Now we run into the problem of the files' contents being encrypted. I began by getting a debugger setup going to reverse engineer the binary. x64dbg isn't my @@ -89,7 +89,7 @@ was really able to get working. Of course, using the debugger alone is a little primitive. We have other tools to make reverse engineering easier. #+CAPTION: A screenshot of procmon alongside x32dbg, logging Windows syscalls that read files. -[[./catching-file-reads.png]] +[[./reverse-engineering-babbys-first-archive-format-catching-file-reads.png]] Enter procmon. It's reminiscent of strace, but it's meant for Windows and has a nice stack trace feature which helps us to locate the code that decrypts the diff --git a/haunt/posts/sdl-tutorial-part-0x00.org b/haunt/posts/sdl-tutorial-part-0x00.org index dab5990..83cee0f 100644 --- a/haunt/posts/sdl-tutorial-part-0x00.org +++ b/haunt/posts/sdl-tutorial-part-0x00.org @@ -173,7 +173,7 @@ your computer can take a short break. Alright. So when we put that in our code it, we get this: #+CAPTION: A screenshot of the window on my system. -[[./window.png]] +[[./sdl-tutorial-part-0x00-window.png]] I'm running i3wm, so it will probably look slightly different for you, but we've finally got a window! It still sucks, though. It doesn't do anything, @@ -278,7 +278,7 @@ int main(int argc, char *argv[]) { Let's run it: #+CAPTION: A screenshot of the completed window on my system. -[[./finished-window.png]] +[[./sdl-tutorial-part-0x00-finished-window.png]] To recap, we learned about: diff --git a/haunt/static/image/Lisp Kludge.png b/haunt/static/image/Lisp Kludge.png deleted file mode 100644 index 9c244b9..0000000 Binary files a/haunt/static/image/Lisp Kludge.png and /dev/null differ diff --git a/haunt/static/image/MyrddinHeap.svg b/haunt/static/image/MyrddinHeap.svg deleted file mode 100644 index b5261bf..0000000 --- a/haunt/static/image/MyrddinHeap.svg +++ /dev/null @@ -1,694 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/haunt/static/image/bad-behavior-debug-prints.png b/haunt/static/image/bad-behavior-debug-prints.png deleted file mode 100644 index 538ccec..0000000 Binary files a/haunt/static/image/bad-behavior-debug-prints.png and /dev/null differ diff --git a/haunt/static/image/bad-behavior-vanilla-hexen-vulnerability.png b/haunt/static/image/bad-behavior-vanilla-hexen-vulnerability.png deleted file mode 100644 index 510cf5f..0000000 Binary files a/haunt/static/image/bad-behavior-vanilla-hexen-vulnerability.png and /dev/null differ diff --git a/haunt/static/image/dollar-bin-reverse-engineering-firmware-mod.jpg b/haunt/static/image/dollar-bin-reverse-engineering-firmware-mod.jpg deleted file mode 100644 index 0b2302e..0000000 Binary files a/haunt/static/image/dollar-bin-reverse-engineering-firmware-mod.jpg and /dev/null differ diff --git a/haunt/static/image/dollar-bin-reverse-engineering-m2.jpg b/haunt/static/image/dollar-bin-reverse-engineering-m2.jpg deleted file mode 100644 index 25aefdb..0000000 Binary files a/haunt/static/image/dollar-bin-reverse-engineering-m2.jpg and /dev/null differ diff --git a/haunt/static/image/dollar-bin-reverse-engineering-mac.jpg b/haunt/static/image/dollar-bin-reverse-engineering-mac.jpg deleted file mode 100644 index 2c66f31..0000000 Binary files a/haunt/static/image/dollar-bin-reverse-engineering-mac.jpg and /dev/null differ diff --git a/haunt/static/image/dollar-bin-reverse-engineering-manual.jpg b/haunt/static/image/dollar-bin-reverse-engineering-manual.jpg deleted file mode 100644 index 731735a..0000000 Binary files a/haunt/static/image/dollar-bin-reverse-engineering-manual.jpg and /dev/null differ diff --git a/haunt/static/image/lisp-personality-test.png b/haunt/static/image/lisp-personality-test.png deleted file mode 100644 index c3a26f3..0000000 Binary files a/haunt/static/image/lisp-personality-test.png and /dev/null differ diff --git a/haunt/static/image/making-your-own-music-player-analog-vs-digital.png b/haunt/static/image/making-your-own-music-player-analog-vs-digital.png deleted file mode 100644 index 6841598..0000000 Binary files a/haunt/static/image/making-your-own-music-player-analog-vs-digital.png and /dev/null differ diff --git a/haunt/static/image/mitmproxy-initial.png b/haunt/static/image/mitmproxy-initial.png deleted file mode 100644 index 3b022e7..0000000 Binary files a/haunt/static/image/mitmproxy-initial.png and /dev/null differ diff --git a/haunt/static/image/ret2emacs-overlay-demo.png b/haunt/static/image/ret2emacs-overlay-demo.png deleted file mode 100644 index 70c6c8e..0000000 Binary files a/haunt/static/image/ret2emacs-overlay-demo.png and /dev/null differ diff --git a/haunt/static/image/reverse-engineering-babbys-first-archive-format-basic-parsing.png b/haunt/static/image/reverse-engineering-babbys-first-archive-format-basic-parsing.png deleted file mode 100644 index 0513350..0000000 Binary files a/haunt/static/image/reverse-engineering-babbys-first-archive-format-basic-parsing.png and /dev/null differ diff --git a/haunt/static/image/reverse-engineering-babbys-first-archive-format-binary-dump.png b/haunt/static/image/reverse-engineering-babbys-first-archive-format-binary-dump.png deleted file mode 100644 index 0a8774c..0000000 Binary files a/haunt/static/image/reverse-engineering-babbys-first-archive-format-binary-dump.png and /dev/null differ diff --git a/haunt/static/image/reverse-engineering-babbys-first-archive-format-catching-file-reads.png b/haunt/static/image/reverse-engineering-babbys-first-archive-format-catching-file-reads.png deleted file mode 100644 index 2ce8f62..0000000 Binary files a/haunt/static/image/reverse-engineering-babbys-first-archive-format-catching-file-reads.png and /dev/null differ diff --git a/haunt/static/image/reverse-engineering-babbys-first-archive-format-xp3-header.png b/haunt/static/image/reverse-engineering-babbys-first-archive-format-xp3-header.png deleted file mode 100644 index 0fac996..0000000 Binary files a/haunt/static/image/reverse-engineering-babbys-first-archive-format-xp3-header.png and /dev/null differ diff --git a/haunt/static/image/sdl-tutorial-part-0x00-finished-window.png b/haunt/static/image/sdl-tutorial-part-0x00-finished-window.png deleted file mode 100644 index 4e9a146..0000000 Binary files a/haunt/static/image/sdl-tutorial-part-0x00-finished-window.png and /dev/null differ diff --git a/haunt/static/image/sdl-tutorial-part-0x00-window.png b/haunt/static/image/sdl-tutorial-part-0x00-window.png deleted file mode 100644 index 0bbe5fc..0000000 Binary files a/haunt/static/image/sdl-tutorial-part-0x00-window.png and /dev/null differ diff --git a/haunt/static/image/shellbot-propagation.jpg b/haunt/static/image/shellbot-propagation.jpg deleted file mode 100644 index 342364c..0000000 Binary files a/haunt/static/image/shellbot-propagation.jpg and /dev/null differ diff --git a/haunt/static/image/sorry-guys-i-have-to-troubleshoot-my-usb-drivers-before-i-can-play-wireshark.png b/haunt/static/image/sorry-guys-i-have-to-troubleshoot-my-usb-drivers-before-i-can-play-wireshark.png deleted file mode 100644 index 2d993af..0000000 Binary files a/haunt/static/image/sorry-guys-i-have-to-troubleshoot-my-usb-drivers-before-i-can-play-wireshark.png and /dev/null differ diff --git a/haunt/static/image/umass-ctf-2021-postmortem-1.png b/haunt/static/image/umass-ctf-2021-postmortem-1.png deleted file mode 100644 index 1bee126..0000000 Binary files a/haunt/static/image/umass-ctf-2021-postmortem-1.png and /dev/null differ diff --git a/haunt/static/image/umass-ctf-2021-postmortem-2.png b/haunt/static/image/umass-ctf-2021-postmortem-2.png deleted file mode 100644 index 7f12ad1..0000000 Binary files a/haunt/static/image/umass-ctf-2021-postmortem-2.png and /dev/null differ -- cgit v1.3