Skip to content

Instantly share code, notes, and snippets.

View Lydxn's full-sized avatar
🏠
Working from home

Lydxn Lydxn

🏠
Working from home
  • University of British Columbia
  • The Milky Way
View GitHub Profile
@Lydxn
Lydxn / pycomment_writeup.md
Created March 10, 2025 07:57
"Pycomment" from KalmarCTF 2025

Pycomment (misc, 2 solves)

In this writeup, I will share how I solved "Pycomment" from KalmarCTF 2025. It was one of the tougher pyjails this year and makes use of two really unique ideas.

Thanks for the challenge, @ChattyPlatinumCool 😛

Description

Can you please help us comment our code? And please don't attack us.

@Lydxn
Lydxn / pi.py
Created April 23, 2023 04:19
Outputs the digits of π. Not for the faint of heart.
___=int(__import__('sys').argv[1]
);_=___*(___//___<<___//___+___//
___+___//___|___//___)//(___//___
<<___//___+___//___+___//+___+___
//___)+(___//___--___//___);__=(_
//_+_//_--_//_)*(_+_+_-~_);print(
((_//_<<_//_+_//_+_//_|_//_+_//_)**___<<(_+_-~_<<_//_+_//_))//((
((((_//_<<__*_*_)//~-(_//_<<__*_)*(((_//_<<(_*_*__<<_//_))//((_//+_<<
// find solutions in the form:
// lambda s:hash(s+'????')%3
#include <stdio.h>
#define NUM 32
#define MIN 1
#define MAX 127
#define HBASE 1000003