Skip to content

Instantly share code, notes, and snippets.

@ardubev16
ardubev16 / install-spark.sh
Created October 25, 2026 22:07
Install Spark Desktop (Windows build, Spark.exe) on Linux using Wine.
#!/usr/bin/env bash
# Install Spark Desktop (Windows build, Spark.exe) on Linux using Wine.
#
# Usage:
# install-spark.sh [path/to/Spark.exe] install or update (default: ./Spark.exe)
# install-spark.sh --uninstall remove app, launcher, menu entry (keeps mail data/prefix)
#
# Environment overrides:
# SPARK_HOME install root (default: ${XDG_DATA_HOME:-~/.local/share}/spark-desktop)
# BIN_DIR launcher symlink dir (default: ~/.local/bin)
// 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(