Skip to content

Instantly share code, notes, and snippets.

@hnoson
hnoson / exploit.py
Created March 7, 2021 12:21
zer0pts CTF 2021 OneShot
#!/usr/bin/env python
from pwn import *
if len(sys.argv) == 1:
s = process('./chall', env={ 'LD_LIBRARY_PATH': '.' })
else:
s = remote('pwn.ctf.zer0pts.com', 9004)
elf = ELF('./chall')
libc = ELF('./libc.so.6')
@hnoson
hnoson / main.c
Last active September 26, 2017 14:41
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
typedef struct reply_t {
int zero;
int deebface;
int number;
char *msg;
@hnoson
hnoson / ppapwn.py
Last active August 18, 2017 13:09
pwn library
import socket
import struct
import subprocess
import threading
import commands
from hexdump import hexdump
import time
import sys
import os
@hnoson
hnoson / decrypt.py
Created March 27, 2017 13:26
VolgaCTF 2017 Quals PyCrypto
#!/usr/bin/env python3
import string
from collections import Counter
if __name__ == '__main__':
with open('flag.enc', 'rb') as fe:
enc = list(fe.read())
ans = [" "] * len(enc)
for i in range(20):
counter = Counter(enc[i::20])
@hnoson
hnoson / vigenere.py
Last active December 11, 2016 09:02
SECCON 2016 quals: Vigenere
import hashlib
import commands
c = "LMIG}RPEDOEEWKJIQIWKJWMNDTSR}TFVUFWYOCBAJBQ"
p = "SECCON{"
k = ""
d = "f528a6ab914c1ecf856a1d93103948fe"
def num(c):
if c == '{':