Skip to content

Instantly share code, notes, and snippets.

@zafirr31
zafirr31 / send.py
Created September 5, 2025 02:43
faster version of send.py, used to send exploit script to remote servers for CTF kernel exploitation challenges
#!/usr/bin/python3
from pwn import *
import os
os.environ["PWNLIB_NOTERM"] = "1"
def send_file(src, dst):
data = b64e(read(src))
p.sendlineafter("$", "stty -echo")
p.sendlineafter("$", f"base64 -d <<EOF > {dst}")
@zafirr31
zafirr31 / Calc.hs
Last active October 17, 2021 15:32 — forked from abhin4v/Calc.hs
Simple Applicative Parser and Expression Calculator in Haskell
module Calc
( Expr(..)
, parse
, calculate
) where
import Control.Applicative
import Parser
data Expr = Add Expr Expr
@zafirr31
zafirr31 / pwntools_example.py
Last active August 20, 2025 15:14
Short pwntools tutorial for beginners
from pwn import *
BINARY = '<path_to_binary>'
IP, PORT = '<ip>', 8080
LOCAL = True
if LOCAL:
p = process(BINARY) # Makes pipe fd