Skip to content

Instantly share code, notes, and snippets.

View pawnlord's full-sized avatar

pawnlord-pɹoluʍɐd pawnlord

View GitHub Profile
import cv2
import numpy as np
import sys
colors = [" ", "____", "/**/", "iiii", "aaaa", "aaaa"]
multiplier = len(colors) - 1
def read_greyscale(imagename):
img = cv2.imread(imagename)

typecheck

Hint:

My C++ code won't type check. Can you fix that for me?
Note: you will need to set -ftemplate-depth=10000 when compiling.

overview

This was a C++ rev challenge involving the template system. It had an input which was the flag, and an input that was the program. It created lists using some variadic templates, and then could use stack like behavior by popping or pushing by invoking further templates.

with open("vmvm.vm", "rb") as vm_file:
vm = vm_file.read()
addrs_to_lines = {}
def read_int(counter):
global vm
return vm[counter] \
+ (vm[counter + 1] << 8) \
from pwn import *
import rand_vals as rv
def get_hex(s, delim=b"0x"):
mlprint(s)
l = s.split(delim)
numbers = []
for seg in l[1:]:
try:
numbers.append(int(seg.split()[0], 16))
vals = [1804289383,
846930886,
1681692777,
1714636915,
1957747793,
424238335,
719885386,
1649760492,
596516649,
1189641421,
from pwn import *
chal = ELF("./chal")
context.binary = chal
musl = ELF("./libc.musl-x86_64.so.1")
mimalloc = ELF("./libmimalloc.so.2.2")
r = remote("doremi.chal.uiuc.tf", 1337, ssl=True)