Day 23 - Safe Cracking [Revival of Code 2023 - Advent of Code 2016] @0xdf
Day 23 - Safe Cracking [Revival of Code 2023 - Advent of Code 2016]  @0xdf
Uploaded August 2023 | Updated November 2026, 3 hours ago
Python Discord is doing an event called Revival of Code, where we work through the 2016 Advent of Code, one challenge every two days. The day 23 challenge, Safe Cracking, involves picking up with the computer from day 12, but adding a toggle instruction, which changes the instructions at a given offset. In part 2, it enters a long loop that can be effectively reduces to a += b * c, but does it rather by one inc at a time. I'll short-circuit that to make it run in reasonable time.

Advent of Code 2016 Day 12 video: youtube.com/watch?v=Z-qDyL-vyNA
Repo for Advent of Code 2016 Solutions: gitlab.com/0xdf/aoc2016
Intro video for this event: youtube.com/watch?v=qEPpsS0StQI
Configuring VSCode to debug PyTest: youtube.com/watch?v=zL2YTdIj3R8
Real Python post with templates: realpython.com/python-advent-of-code

☕ Buy Me A Coffee: buymeacoffee.com/0xdf

[00:00] Introduction
[00:16] Challenge part 1
[01:41] Bringing in the day 12 code
[03:10] Test for part 1
[04:11] Adding toggle instruction
[08:49] Fixing tests, solving part 1
[09:40] Challenge part 2
[10:12] Showing part2 has long runtime without change
[11:00] Using VSCode debug to find what's slow
[12:55] Assembunny code analysis
[14:07] Function to handle multiply/add
[16:03] Regex development
[17:26] Continuing with multiple/add
[20:32] Summary of function
[20:52] Debugging issue with findall
[21:34] Solving and conclusion

#ctf #adventofcode #revivalofcode #python
Day 23 - Safe Cracking [Revival of Code 2023 - Advent of Code 2016]Oddly Even [HackTheBox - Coding Challenge]Free AI HTB TutorDay 20: Pulse Propagation [AOC2023 Python]Malicious LNK File Analysis0o337 [0xff: One Last Address]HackTheBox Napper: Read Elastic, Generate Key, Decrypt Blob in GolangExploring a Simple Ruby Web Application [HackTheBox Precious Beyond Root]OnlyHacks [HackTheBox Web Challenge]Reactor [AOC2025 Day 11]Insane Bolt [HackTheBox - Coding Challenge]NovaEnergy - HackTheSystem CTF
0xdf |

Day 23 - Safe Cracking [Revival of Code 2023 - Advent of Code 2016]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER