Skip to content

Instantly share code, notes, and snippets.

View ardubev16's full-sized avatar
🦎

Lorenzo Bevilacqua ardubev16

🦎
View GitHub Profile
@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(