Skip to content

Instantly share code, notes, and snippets.

View ardubev16's full-sized avatar
🦎

Lorenzo Bevilacqua ardubev16

🦎
View GitHub Profile
// Run the following command to build (you will need `typst` installed):
// ```sh
// curl https://gist.githubusercontent.com/ardubev16/f9493578a5141d5ab9d7c649d2268567/raw/emergency_sheet.typ | typst compile - emergency_sheet.pdf
// ```
#set document(title: "Password Manager Emergency Sheet")
#set page(paper: "a4", margin: 1.4cm)
#set text(font: "Liberation Sans", size: 11pt)
@ardubev16
ardubev16 / find_ra.py
Last active May 12, 2023 20:42
A function to find the return address offset in CTF challenges with simple buffer overflows, works with both 32-bit and 64-bit binaries
#!/usr/bin/env python3
from pwn import *
def find_ra(proc: process, buf_size: int = 1000) -> int:
"""Find the offset of the return address on the stack.
Args:
send_payload: A function that sends the payload to the target.
buf_size: The size of the buffer in bytes.
@ardubev16
ardubev16 / flipper2mct.py
Created May 7, 2023 17:29
Convert Flipper Zero Mifare Classic 1k & 4k dumps to MCT (Mifare Classic Tools). Fixed version (for 4k) of https://github.com/whyn0/FlipperNFC2MCT
import argparse
import re
import logging
logging.basicConfig(
level=logging.INFO,
format="[%(levelname)s] %(message)s",
)
parser = argparse.ArgumentParser(