Triple Knock [HackTheBox - Coding Challenge] @0xdf
Triple Knock [HackTheBox - Coding Challenge]  @0xdf
Uploaded June 2025 | Updated November 2026, 3 hours ago
For Triple Knock, I'll parse a series of log lines showing username, date and time, and login success or failure. I need to find any user with three failed logins in a 10 minute window. To accomplish this in Python, I'll create a simple Event class that handles parsing the line into a user, failed boolean, and a minutes timestamp. Then I'll store failed logins in a defaultdict by username, and then loop over using a sliding window to find targeted users.

Final code: gitlab.com/0xdf/ctfscripts/-/tree/master/htb-triple_knock
☕ Buy Me A Coffee: buymeacoffee.com/0xdf

[00:00] Introduction
[01:05] Challenge intro
[03:00] Reading S, N
[03:55] Starting loop to process lines
[04:30] Creating Event class
[07:40] Printing Events
[09:44] Collecting failed logins by user
[11:32] Sorting failures by user
[11:58] Checking users for targeting
[13:39] __gt__
[14:34] Formatting output
[15:10] Conclusion

#python
Triple Knock [HackTheBox - Coding Challenge]Day 14 - One-Time Pad [Revival of Code 2023 - Advent of Code 2016]Introduction [Advent of Code 2024]Disk Fragmenter [Day 9 - Advent of Code 2024 - Python]Reassembling Werkzeugs Pin - Hacking Flask Debug Mode [Part 1]Keypad Conundrum [Day 21 - Advent of Code 2024 - Python]Modifying .NET Exe: Encrypt to Decrypt [HackTheBox Coder]Day 20 - Firewall Rules [Revival of Code 2023 - Advent of Code 2016]Day 5 - How About a Nice Game of Chess? [Revival of Code 2023 - Advent of Code 2016]Hacking the HackTheBox Code EditorRelic Maps [Forensics - Cyber Apocalypse 23 CTF]Guard Gallivant [Day 6 - Advent of Code 2024 - Python]
0xdf |

Triple Knock [HackTheBox - Coding Challenge]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER