Skip to content

Instantly share code, notes, and snippets.

View volticks's full-sized avatar
😤
TryHarding (a little bit)

Jamie volticks

😤
TryHarding (a little bit)
View GitHub Profile
@volticks
volticks / gctf21-compression.py
Last active July 20, 2021 21:18
I failed the googleCTF 2021 challenge for 'compression' so I though I would try again, this time making plenty of notes. I hope this is useful to someone else who alos failed :).
#!/usr/bin/python
from pwn import *
# Note 2, this will now work with any commands lower than 16 bytes :). Any more than that will be copied over the stack canary.
# Get the string representation of a bytes/multiple bytes. Thanks google
def varint(n):
if n < 0:
n += 2**64
# Creates a simple directory maze. May be useful for CTF challenges where file races are involved (hi pwn.college :) )
import os
import shutil
import sys
# How many directories do you want to make? 50 works quite well.
dirdepth = 50
# For some reason the os.symlink() was messing up (probably because of me), so i made my own, worse version