Skip to content

Instantly share code, notes, and snippets.

View maxdavid's full-sized avatar

Max David maxdavid

View GitHub Profile
@maxdavid
maxdavid / background-remove.sh
Created January 12, 2020 06:28
Script to replace white image backgrounds with transparency
#!/bin/bash
# Converts white backgrounds to transparent.
# Pass the image path and threshold percentage
# example:
# ./background-remove.sh catpic.jpg 20%
IMGPATH=$1
THRESHOLD=$2
@maxdavid
maxdavid / tmuxfixer.js
Created May 21, 2019 21:31
Simple script for updating tmux config files, converting deprecated -fg, -bg, and -attr options to the combined -style option
#!/usr/bin/env node
/*
tmuxfixer.js
USAGE:
$ node tmuxfixer.js old-conf-path [new-conf-path]
PURPOSE & CONTEXT: This script takes in a tmux configuration file and combines
all deprecated -fg, -bg, and -attr into a single -style option line.
@maxdavid
maxdavid / delete-fb-activity.iim
Last active July 5, 2016 23:49
Script for the Firefox extension iMacros to delete all your own Facebook activity. Put your FB username in the url and loop it in iMacros 1000 times. May take a while, so let it run overnight.
VERSION BUILD=8920312
TAB T=1
SET !ERRORIGNORE YES
URL GOTO=https://www.facebook.com/<YOUR FACEBOOK USERNAME HERE>/allactivity?privacy_source=activity_log&log_filter=cluster_11
' Eventually, depending on how many posts there are, you'll need to start manually skipping to years.
' Uncomment the line below and decrement the year as needed.
'TAG POS=1 TYPE=A ATTR=HREF:/< USERNAME >/timeline/2010
WAIT SECONDS=5
URL GOTO=javascript:window.scrollBy(0,100000)
TAG POS=1 TYPE=A ATTR=aria-label:"Allowed on Timeline"

Keybase proof

I hereby claim:

  • I am maxdavid on github.
  • I am maxdavid (https://keybase.io/maxdavid) on keybase.
  • I have a public key whose fingerprint is 47BE A3C1 10E1 E0A9 43B6 E514 197B 2596 4BDA 57F6

To claim this, I am signing this object:

@maxdavid
maxdavid / EDURange Minutes (5-7-2014).md
Last active August 29, 2015 14:01
EDURange meeting minutes, Day 1 of Spring 2014 Hackathon

EDURange Minutes

May 7th, 2014 (20:00)

Richard: Where do we want to be at the end of the summer?

Summer Timeline

  • Have both the recon and grammar calculator scenarios "finished"
  • "finished" meaning ready to play in a running EDURange instance
  • Some semblance of scoring
@maxdavid
maxdavid / nethack-bot.rb
Created March 20, 2014 23:21
IRC bot that plays 'TESC Plays Nethack', a crowdsourced nethack game that takes commands from an IRC channel. 'TESC Plays Nethack' (or TPN) is part of a compsec exercise put on by The Evergreen State College. As a service that needs to be defended by the blue team, these bots add "users" to the narrative.
# `TESC Plays Nethack' bot
# arg 1 = irc nick
# args 1< = additional phrases
require 'cinch'
ircnick = ARGV[0]
class NethackCommands
include Cinch::Plugin
# every 10 seconds, call 'timed'
@maxdavid
maxdavid / paytv_attack.py
Created October 24, 2013 03:10
A dirty timing attack script for challenge #4 of hack.lu CTF
#!/usr/bin/env python
import urllib
import urllib.parse
import urllib.request
import string
import json
url = 'https://ctf.fluxfingers.net:1316/gimmetv'
key_length = 10
@maxdavid
maxdavid / tor-scramblr.sh
Created October 24, 2013 01:00
Script for hack.lu that attempts to access a URL from as many different countries as possible. cat the output to a file while running in the background and you're ready to gravy
#!/bin/bash
while true; do
pidof tor | xargs kill -HUP # get a new tor identity
torify wget -qO- https://ctf.fluxfingers.net/ref/oSaBba5IScd8V2a --no-check-certificate | grep "successfully"
done
@maxdavid
maxdavid / Hacker Club mission statement
Last active December 25, 2015 20:09
Mission statement for Evergreen's Hacker Club, as per http://www.evergreen.edu/activities/handbook/mission.htm. Work in progress.
The Evergreen Hacker Club is a collection of individuals interested in
learning, discussing, and implementing real-world applications of advanced
technological subjects. We focus on topics chosen by the membership, and
regularly host workshops for the group to share their skills with each other.
Hacker Club is also home to the GNU-e-Ducks, Evergreen's competitive
cyber-security team.
@maxdavid
maxdavid / xkcd-hasher.py
Last active December 15, 2015 17:20
A quick and sloppy attempt to win http://almamater.xkcd.com/ for evergreen.edu
#!/usr/bin/env python3
# xkcd-hasher.py
# for the motherland!! http://almamater.xkcd.com/
# forked from arthurdent's 1193.py. thx buddy
#
# usage: ./xkcd-hasher.py <num hashes> <randword length> <goal number>
from skein import skein1024
from datetime import *