Skip to content

Instantly share code, notes, and snippets.

View bahorn's full-sized avatar
🏴‍☠️

B. Horn bahorn

🏴‍☠️
View GitHub Profile
" Vundle
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'itchyny/lightline.vim'
Plugin 'flazz/vim-colorschemes'
Plugin 'rykka/mathematic.vim'
Plugin 'hari-rangarajan/CCTree'
@bahorn
bahorn / covhacksoc.md
Created December 14, 2017 09:49
CovHackSoc

Coventry Hackathon Society

About

Society formed around going to hackathons and playing with tech.

Why Hackathons?

Great fun and an good way of trying new things!

/* Here you have an exploit for CVE-2017-5754, otherwise known as "Meltdown".
*
* Mostly based on the paper [1], but it had to be adjusted a bit.
* I found that the Flush+Reload method didn't work as described (with a buffer
* of 256 pages) and had to do the binary method (which is otherwise faster, but
* more complex to implement).
*
* TSX is not present on many CPUs (including the one I wrote this exploit on),
* so I settled for handling the SEGV signal.
*
@bahorn
bahorn / etherpads.md
Last active January 28, 2018 01:35
HackSoc etherpads

CovHackSoc Organisation Etherpads

We like to use etherpad to plan most things. We use the instance hosted under wikimedia. They should be backed up regularly.

HackSoc planning (early)

Etherpad we used to plan stuff early on.

https://etherpad.wikimedia.org/p/l1d8VyBwdC

@bahorn
bahorn / sign.py
Last active October 27, 2023 15:07
Implementation of the Tuya API signing.
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# This is based on my personal implementation but stripped down to only what is
# needed to verify it.
@bahorn
bahorn / tuya_cloud.py
Created January 31, 2018 20:36
Cloud endpoint
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# Fixed up version of my previous code to work with the Cloud endpoints.
# Hopefully this works.
@bahorn
bahorn / facebook_auth.py
Last active February 8, 2018 16:27
Hacked up Flask server to login to authorise as a facebook user.
import os
import json
import binascii
import requests
from flask import Flask, request
app = Flask(__name__)
# Web app to get use a user token from Facebook
app_id = "<BLANKED>"
app_secret = "<BLANKED>"
@bahorn
bahorn / whatyouneed.md
Last active February 23, 2018 19:08
What to bring to a Hackathon?

Checklist for what to bring to a Hackathon - CovHackSoc

Important

  • Something to write Code on (Laptop, Desktop, Tablet, etc)
  • DO NOT FORGET CHARGERS.
  • Extention cords come in very handy.
  • Headphones
  • Hygine products
  • Stuff to sleep in.
  • Open Mind :)
@bahorn
bahorn / LowLevelHax.md
Last active March 11, 2018 12:18
Links I think are cool.
@bahorn
bahorn / wow.sh
Created March 12, 2018 21:09
Docker GUI.
#!/bin/bash
IMAGE=<IMAGE_HERE>
CONTAINERNAME=<NAME_HERE>
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
docker run -dt \
--name $CONTAINERNAME \
-p 4444:4444 \
-v $XSOCK:$XSOCK \