Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<style lang="css">
#the-canvas {
border: 1px solid black;
direction: ltr;
}
@rugo
rugo / insomnihack.py
Created January 23, 2019 12:43
Insomnihack Drinks
import os
import random
import base64
import requests
import string
SEARCHSP = list("_" + string.printable[:-6])
PAD = string.ascii_lowercase + "!§$%&()=?-:;#'+*<>|"
# Gauss Jordan is from pastebin, lol
# https://pastebin.com/Efmb7bsN
import copy
gj_mat = []
row = None
col = None
p = 21652247421304131782679331804390761485569
def egcd(a, b):
from pwn import *
import random
import pickle
import binascii
from pure25519.eddsa import *
def getrandbytes(l):
return bytes(bytearray(random.getrandbits(8) for _ in xrange(l)))
@rugo
rugo / vuln.c
Created December 11, 2018 08:28
#define _POSIX_C_SOURCE 1
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/random.h>
#include <sys/sendfile.h>
@rugo
rugo / swag.py
Last active March 30, 2019 20:53
MeePwn CTF Still Old School Solution of RedRocket (blog.redrocket.club)
import pexpect
import re
from multiprocessing import Process, Queue
from Crypto.Cipher import AES
def inv(x):
x ^= (x >> 18)
# Lowest 16 bit stay how they are, so we can just repeat...
x ^= (x << 15) & 0xEFC60000
# Do it step by step
@rugo
rugo / forb_expl.py
Created March 27, 2018 19:17
VolgaCTF Quals 2018 forbidden crypto task
"""
VolgaCTF Quals 2018 forbidden crypto task
This implements the forbidden attack on Galois/Counter Mode AES
useage: sage -python forb_expl.py
"""
from binascii import unhexlify, hexlify
from sage.all import *
def slice_and_pad(b_str, bsize=16):