Skip to content

Instantly share code, notes, and snippets.

View wckd's full-sized avatar

Alexander Hansen wckd

  • Norway
View GitHub Profile

Keybase proof

I hereby claim:

  • I am wckd on github.
  • I am wckd (https://keybase.io/wckd) on keybase.
  • I have a public key whose fingerprint is F918 199A FBD4 094B 257E 0287 E477 045A 3C14 1934

To claim this, I am signing this object:

@wckd
wckd / nrkripper.py
Last active October 25, 2017 18:44
nrkripper: Rip your favourite shows on nrk with ease.
#!/usr/bin/env python3
"""nrkripper: Rip your favourite shows on nrk with ease."""
__author__ = "Alexander H."
__license__ = "GPLv3"
from urllib import request
from json import loads
from sys import argv, exit
from re import search
# Based on pygmalion, modified to suit my taste
prompt_setup_alexander(){
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
base_prompt='%{$fg[cyan]%}%n%{$reset_color%}%{$fg[red]%}@%{$reset_color%}%{$fg[yellow]%}%m%{$reset_color%} %{$fg[cyan]%}%c %{$reset_color%}'
@wckd
wckd / wslisten.py
Last active December 5, 2016 15:57
OSE/OAX websocket
#!/usr/bin/python
import websocket
try:
import _thread as thread
except ImportError:
import thread
import json
import pprint
def on_message(ws, message):
@wckd
wckd / idunn-pdf.py
Last active August 29, 2015 14:16
Download issues in pdf-form from idunn.no
#!/usr/bin/env python
import requests
from bs4 import BeautifulSoup
import os
## Settings
base_url = 'http://www.idunn.no'
folder = 'skatt' ## change this
scrape_url = '{0}/{1}'.format(base_url, folder)
pdf_url = ('{0}/{1}').format(base_url, 'file/pdf')
@wckd
wckd / requirements
Created April 16, 2014 11:22
Requirements OSX
* Alfred v2
* Virtualbox
* Skype
* Spotify
* Evernote
* git
* Sublime
* Handbrake
* Caffeine
* Filezila
@wckd
wckd / hb-test.py
Created April 16, 2014 11:19 — forked from matause/hb-test.py
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@wckd
wckd / fswatch.sh
Created April 16, 2014 11:14 — forked from tureki/fswatch.sh
#!/bin/bash
#install fswatch
brew install fswatch
#fswatch to keep a directory in sync with other directory
fswatch /Users/tureki/Desktop/files/ /Users/tureki/sh/rsync.sh
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
#!/usr/bin/python
# Connects to servers vulnerable to CVE-2014-0160 and looks for cookies, specifically user sessions.
# Michael Davis (mike.philip.davis@gmail.com)
# Based almost entirely on the quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import select