Uploaded December 2023 | Updated November 2026, 3 hours ago
For Advent of Code 2023 Day 11, I get a map of galaxies in space. I need to get the manhattan distance between each pair and sum that. The twist is that any empty row or empty column counts for more than one space. In part 1, it's double. In part 2, it's a millions times!
Code 2023 AOC: gitlab.com/0xdf/aoc2023
Challenge Link: adventofcode.com/2023/day/11
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:10] Input
[02:07] Getting Galaxies
[03:46] Getting empty rows and cols
[05:58] Looping over galaxy pairs
[06:56] get_dist function
[08:32] Testing get_dist
[10:44] Solving ex and part 1
[11:03] Part 2 description
[11:16] Updating scale factor
[11:36] Solve part 2
#adventofcode #python
For Advent of Code 2023 Day 11, I get a map of galaxies in space. I need to get the manhattan distance between each pair and sum that. The twist is that any empty row or empty column counts for more than one space. In part 1, it's double. In part 2, it's a millions times!
Code 2023 AOC: gitlab.com/0xdf/aoc2023
Challenge Link: adventofcode.com/2023/day/11
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:10] Input
[02:07] Getting Galaxies
[03:46] Getting empty rows and cols
[05:58] Looping over galaxy pairs
[06:56] get_dist function
[08:32] Testing get_dist
[10:44] Solving ex and part 1
[11:03] Part 2 description
[11:16] Updating scale factor
[11:36] Solve part 2
#adventofcode #python
![Exploring the HackTheBox TwoMillion PHP Application [Beyond Root]
HackTheBox released TwoMillion to celebrate having two million users. This is a fun throwback to what HTB looked like when it first launched in 2017. In this video, Ill explore the PHP code that makes up the site, and the vulnerabilities I exploit to get a shell.
#pentest #ctf #twomillion #hackthebox.
Full TwoMillion Post: https://0xdf.gitlab.io/2023/06/07/htb-twomillion.html
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:47] Review of PHP files
[01:14] Routers in index.php
[02:20] Home controller
[03:07] Invite controller
[04:50] Admin controller, first vulnerability
[06:50] Fixing vulnerability allowing non-admin access
[09:45] VPN controller, second vulnerability
[11:45] Conclusion Exploring the HackTheBox TwoMillion PHP Application [Beyond Root]](https://i.ytimg.com/vi/es99eG_VcaI/mqdefault.jpg)
![Day 4: Scratchcards [AOC2023 Python]
For Advent of Code 2023 Day4, I get a series of lines, each of which represents a scratchcard. Each card has a series of winning numbers and a series of numbers for that card. In part 1, I need to calcaulate a score for each card based on the number of winners and sum them up. In part 2, I get copies of later cards based on the number of winners on each card, so I need to keep a list of the number of each card I have and total that up at the end.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/4
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#adventofcode #python
[00:00] Part 1 description
[01:16] Input
[02:05] score_card function
[05:09] Fixing bug with 0 winners
[06:31] Solving part 1
[07:09] Part 2 description
[08:29] Initial solution
[11:49] Identify score issue
[12:25] Fixing score issue
[16:00] Solving part 2
[16:10] Summary Day 4: Scratchcards [AOC2023 Python]](https://i.ytimg.com/vi/ettyYwXc_F4/mqdefault.jpg)

![Python Script to Read Files on Encoding [HackTheBox]
In Encoding from HackTheBox, Ive got a web endpoint that will return to me encoded copies of the files on the host. Ill write a Flask proxy so that I can easily enumerate the host, and even run a tool like git-dumper to download a Git repository.
Encoding blog post: https://0xdf.gitlab.io/2023/04/15/htb-encoding.html
git-dumper: https://github.com/arthaud/git-dumper
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:52] Scenario overview
[03:20] Vulnerability overview
[04:03] Strategy for proxy vs script vs in console
[04:58] Starting Flask server with path as variable
[07:17] Updating server to read /etc/passwd from Encoding
[08:58] Updating to take different file names
[09:36] Fixing response content-type to work with git-dumper Python Script to Read Files on Encoding [HackTheBox]](https://i.ytimg.com/vi/f0m-3P7_bsU/mqdefault.jpg)
![Brute Forcing a Web Pin - Frosty Keypad [Sans Holiday Hack 2024]
For the Frosty Keypad objective in the SANS Holiday Hack 2024, Ive got a keypad that takes five digit pins, and I know the pin is made up of some combination of 2, 6, 7, and 8. Ill look at how the requests are submitted, and write a Python script to brute force pins until I have the correct one. There is a rate limiting, but the message suggests its based on User Agent string, which I bypass by generating a random string for each request.
2024 HHC Blog post: [Coming soon]
Terminal Link: https://hhc24-frostykeypad.holidayhackchallenge.com/?&challenge=termFrostyKeypad
TamperMonkey Script: https://gitlab.com/0xdf/ctfscripts/-/blob/master/holidayhack/termlink.js
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:35] Challenge introduction
[01:01] Observing request
[02:03] Initial script
[04:58] Identifying rate limiting
[05:17] While true, sleep, retry
[06:31] Running script, too slow
[06:53] Error message analysis
[07:17] Random UA string
[08:32] Running to solve
[08:52] Conclusion
#python #ctf #requests #brute-force #rate-limit Brute Forcing a Web Pin - Frosty Keypad [Sans Holiday Hack 2024]](https://i.ytimg.com/vi/f1r8CPMrWS4/mqdefault.jpg)
![Printing Department [AOC2025 Day 4]
Advent of Code 2025 Day 4 is the first grid challenge of the year. Im given spaces in a warehouse that have pallets of paper on them. A forklift can only access a pallet to move it if there are less than three pallets in the eight spaces around the pallet. In part 1, I need to find how many are accessible. In part 2, I can iterate, removing all accessible, and then re-examining and removing ones that are newly accessible, until there are not left that can be moved. Claude nailed this one in less than a minute with a pretty clean solution.
Solutions Repo: https://gitlab.com/0xdf/aoc2025
VSCode Debug Setup: https://www.youtube.com/watch?v=cNhtk2Ob4B8
Claude: https://claude.ai/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:59] Pulling / examining input
[01:27] Procesing grid into defaultdict
[03:26] count_neighbors function
[04:50] Counting accessible spaces
[05:22] Fixing error with looping over changing dict
[06:13] Fixing error with counting
[08:25] Solving part 1
[08:43] Part 2 introduction
[09:22] Generating next grid iteration
[10:21] Function to count grid
[11:06] Calculating change
[11:43] Fixing forgot to update grid
[12:00] Fixing missing check for paper
[14:00] Solving part 2
[14:25] Solving with Claude
[15:36] Analysis of Claudes solution
[17:03] Conclusion
#AdventOfCode #claude Printing Department [AOC2025 Day 4]](https://i.ytimg.com/vi/fDv0soav8Mw/mqdefault.jpg)
![PowerShell Challenge [Sans Holiday Hack 2024]
The PowerShell terminal in the 2024 Holiday Hack Challenge is all about using PowerShell to interact with a webserver. Ill play with credentials, cookies / websessions, and a lot of long pipelines to automate parsing of results into new requests. Ill show both the silver and gold solves.
2024 HHC Blog post: [Coming Jan 2025]
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:30] Q1
[01:00] Tmux operations
[01:19] Q2
[01:48] Q3
[02:37] Q4
[03:10] Q5
[06:38] Q6
[09:30] Q7
[12:20] Q8
[12:50] Q9
[14:57] Q10
[20:53] Q11
[21:50] Update for gold
[22:32] Gold solve
[35:56] Conclusion
#powershell #ctf PowerShell Challenge [Sans Holiday Hack 2024]](https://i.ytimg.com/vi/fx1O7BIiNuo/mqdefault.jpg)
![Scanning UDP with nmap
Scanning UDP with nmap can be slow, flaky, and/or unreliable. In this video, well cover the techniques I use to get a quick view of open UDP ports, and explore some potentially unexpected results so that were comfortable with the conclusions.
#pentest #ctf #bugbounty
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:48] Initial scan of top 10 ports
[01:51] Top 100 ports
[02:30] Top 1000 with min-rate to speed it up
[04:06] Looking at extra closed/filtered ports
[05:20] Looking at non-sped-up in Wireshark
[06:23] Theory as to whats going on
[06:51] General strategy / takeaway
[07:41] Comparing filtered vs closed Scanning UDP with nmap](https://i.ytimg.com/vi/fzl9g0ZgON8/mqdefault.jpg)
![Reading (Almost) A Million QRCodes [Hackvent 2022 - Day 16]
In this hackvent challenge, Im giving an image which Ill break into almost a million pieces and try to read each piece as a QRcode to find the flag in one of them. Ill use the PIL and pyzbar libraries in Python.
Hackvent 2022 writeup: https://0xdf.gitlab.io/hackvent2022/hard
PIL Max Pixel Limit: https://stackoverflow.com/questions/51152059/pillow-in-python-wont-let-me-open-image-exceeds-limit
Git Issue about pyzbar error messages: https://github.com/NaturalHistoryMuseum/pyzbar/issues/29
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#hackvent
[00:00] Introduction
[00:28] Looking at QR Image
[00:56] Loading image with Python and PIL
[01:45] Cropping image to remove boarder
[03:11] Reading QRCode
[04:10] Compression Bomb error
[05:10] Scan code error
[06:51] Dividing image into 25x25 smaller images
[11:17] Further dividing in half 5 times
[13:40] Running to solve
[14:00] Improvements to save flag, exit
[14:35] Counting squares and codes
[17:42] Justifying the image count number Reading (Almost) A Million QRCodes [Hackvent 2022 - Day 16]](https://i.ytimg.com/vi/geTs9N9Ew6Q/mqdefault.jpg)
![Day 1: Trebuchet?! [AOC2023 Python]
For Advent of Code 2023 Day1, I need to find numbers in lines of text. It gets tricky in part two where I need to find digits and spelled out digits (like one).
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/1
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#adventofcode #python
[00:00] Introduction
[00:22] Part 1 description
[01:04] genday overview
[01:59] Input review
[02:25] Part1 framework
[03:20] Three ways to remove non-digits
[05:05] Solving part1
[05:22] Part2 description
[05:57] Basic framework for part2
[07:20] Checking assumptions
[08:30] Part2 attempt
[09:10] Debugging silly errors
[11:02] Identify issue with overlapping words
[12:19] Solution for overlapping words
[15:02] Solving Part2 Day 1: Trebuchet?! [AOC2023 Python]](https://i.ytimg.com/vi/ggwPSoX364s/mqdefault.jpg)
![Monkey Market [Day 22 - Advent of Code 2024 - Python]
Im given seeds to a pseudo random number generation algorithm, and asked to find the 2000th number for each, and then asked to look for patterns in the differences.
2024 AOC repo: https://gitlab.com/0xdf/aoc2024/
2024 AOC Intro video: https://www.youtube.com/watch?v=4XKZZrhhiQE
VSCode Debug video: https://www.youtube.com/watch?v=cNhtk2Ob4B8
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part1 introduction
[02:19] Input review
[03:02] Function to generate next number
[04:16] Checking next_num function
[05:40] Looping over inputs
[06:25] Solving part 1
[06:46] Part 2 challenge
[08:26] Capturing prices
[09:44] Calculating differences
[10:44] Fingerprinting prices
[14:45] Getting max result
[16:00] Conclusion
#adventofcode #python Monkey Market [Day 22 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/gn-eoGHDoMM/mqdefault.jpg)