Uploaded July 2023 | Updated November 2026, 3 hours ago
While doing an Advent of Code challenge, I found myself really wanting to debug PyTest. This video shows how I set that up.
VSCode Variables: code.visualstudio.com/docs/editor/variables-reference
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
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Introduction
[00:15] VSCode debug python script
[01:01] Doesn't run PyTest tests
[01:30] Looking at launch.json
[02:05] Adding PyTest configuration
[02:51] Hardcoding directory
[04:25] Using variables to get current directory
[05:01] Debugging PyTests
#ctf #adventofcode #revivalofcode #python
While doing an Advent of Code challenge, I found myself really wanting to debug PyTest. This video shows how I set that up.
VSCode Variables: code.visualstudio.com/docs/editor/variables-reference
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
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Introduction
[00:15] VSCode debug python script
[01:01] Doesn't run PyTest tests
[01:30] Looking at launch.json
[02:05] Adding PyTest configuration
[02:51] Hardcoding directory
[04:25] Using variables to get current directory
[05:01] Debugging PyTests
#ctf #adventofcode #revivalofcode #python
![Exploring a Flask App with SSTI [HackTheBox Sandworm]
In the Sandworm box from HackTheBox, the foothold involves exploiting a server-side template injection (SSTI) vulnerability in a Python Flask application. In this video, Ill come back with my root shell and look at how the application is setup, and show why it is vulnerable to SSTI.
HackTheBox Sandworm: https://www.hackthebox.com/machines/sandworm
Sandworm Blog Post: https://0xdf.gitlab.io/2023/11/18/htb-sandworm.html
Flask factories: https://flask.palletsprojects.com/en/2.3.x/patterns/appfactories/
python-gnupg: https://gnupg.readthedocs.io/en/latest/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:17] Overview of webpage
[02:15] Demonstrate SSTI
[02:52] Looking at Firejail / Flask service
[03:50] Flask run
[04:50] App Factories
[06:15] init .py
[07:00] app.py overview
[08:28] Route with POST
[09:14] Verify routes
[11:14] Flask hello world
[12:09] Adding user input
[13:06] Use template
[14:45] SSTI payload fail
[15:09] Switch to render_template_string
[16:05] Fixing typo
[16:24] Successful exploitation
[17:20] Conclusion
#pentest #ctf #bugbounty #python #ssti Exploring a Flask App with SSTI [HackTheBox Sandworm]](https://i.ytimg.com/vi/zfp7udPF8fs/mqdefault.jpg)
![Day 22: Monkey Map [AOC2022 Python]
For Advent of Code 2022 Day 22, Im given a map thats made up of walls and empty spaces. The shape of the map is irregular, and it turns out, it can be folder together to make a cube. In part 1, Ill walk around in the 2D space, but in part 2, Ill have to walk around the cube in 3D space. Ill solve this an ugly way, hard-coding the edges that connect rather than getting them algorithmicly.
Code 2022 AOC: https://gitlab.com/0xdf/aoc2022
Challenge Link: https://adventofcode.com/2022/day/22
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#adventofcode #python
[00:00] Introduction
[00:26] Part 1 description
[02:40] Setup constant dictionaries to handle directions, turns
[03:26] World class, init to parse input
[06:43] step function to take a step in the current facing
[08:19] turn function to update facing based on turn instruction
[08:30] run function to loop over all instructions and return score
[08:43] Creating World
[09:15] Running part 1, solving
[09:46] Part 2 description
[11:16] Looking at the sides on example and input
[11:37] Strategy Discussion
[12:41] Change to step function
[12:52] parse_edges function
[14:34] Running to solve
[14:51] Conclusion Day 22: Monkey Map [AOC2022 Python]](https://i.ytimg.com/vi/zh8LkndRUtE/mqdefault.jpg)