Day 8 - Two-Factor Authentication [Revival of Code 2023 - Advent of Code 2016] @0xdf
Day 8 - Two-Factor Authentication [Revival of Code 2023 - Advent of Code 2016]  @0xdf
Uploaded July 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 8 challenge, Two-Factor Authentication, processing a set of instructions that manipulate pixels on a 50x6 screen. I'll need to rotate both rows and columns, as well as turn on blocks. At the end, I'll show a fancy automation of the full application.

Repo for Advent of Code 2016 Solutions: gitlab.com/0xdf/aoc2016
Intro video for this event: youtube.com/watch?v=qEPpsS0StQI
Real Python post with templates: realpython.com/python-advent-of-code
Python regex: pypi.org/project/regex

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

[00:00] Introduction
[00:34] Challenge Part 1
[01:46] genday.sh / input
[02:10] Setting up test fixture
[02:56] test_parse
[05:01] Screen class and __init__
[09:00] Tests for screen tracking
[10:03] Creating screen with deques
[13:25] Tests for Part 1
[14:37] Reorganizing main
[15:15] pixels_on function
[16:41] run function
[18:01] Processing Rect instruction
[22:12] rotate functions
[24:10] Solving Part 1
[24:29] Challenge Part 2
[24:44] to_string function
[25:21] to_string tests (oops!)
[27:15] Finishing to_string
[28:14] Solving Part 2
[29:02] Fancy Animation!


#ctf #adventofcode #revivalofcode #python
Day 8 - Two-Factor Authentication [Revival of Code 2023 - Advent of Code 2016]Reversing and Brute-Forcing TOPT Browser Plugin Export [HackTheBox Coder]Web Assembly Reversing Challenge [CodeLocked - Hacky Easter 2023]Ceres Search [Day 4 - Advent of Code 2024 - Python]JinjaCare - HackTheSystem CTFGameover(lay) Exploit ExplainedGift Shop [AOC2025 Day 2]Crossed Wires [Day 24 - Advent of Code 2024 - Python]Exploiting CVE-2023-40028 [LinkVortex - HackTheBox]Day 9 - Explosions in Cyberspace [Revival of Code 2023 - Advent of Code 2016]Tracing Automations in HackTheBox Mailroom [Beyond Root]Christmas Tree Farm [AOC2025 Day 12]
0xdf |

Day 8 - Two-Factor Authentication [Revival of Code 2023 - Advent of Code 2016]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER