Skip to content

Instantly share code, notes, and snippets.

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

B Horn bahorn

🏴‍☠️
On vacation
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 / localhackday.md
Last active May 4, 2021 16:13
Local Hack Day @ CovHackSoc

Local Hack Day @ CovHackSoc

About

Major League Hacking is organising one massive, distributed Hackathon.

Us at @CovHackSoc are running on of the local events, here at Coventry in EC2-12.

Us

@bahorn
bahorn / resources.md
Created October 15, 2018 16:14
CovHackSoc Infosec resources

General

Articles

@bahorn
bahorn / jinja2Template.py
Created May 2, 2018 18:56
Jinja2 Template preview
import sys
from jinja2 import Template
def renderTemplate(template, context):
t = Template(template)
return t.render(context)
if __name__ == "__main__":
context = {}
template = open(sys.argv[1],'r').read()
@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 \
@bahorn
bahorn / LowLevelHax.md
Last active March 11, 2018 12:18
Links I think are cool.
@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 / 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 / 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 / sign.py
Last active January 14, 2025 23:11
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.