Skip to content

Instantly share code, notes, and snippets.

View dubs3c's full-sized avatar
😈
I solemnly swear that I am up to no good

dubs3c dubs3c

😈
I solemnly swear that I am up to no good
View GitHub Profile
@dubs3c
dubs3c / keyboard_extract.py
Created February 24, 2018 23:23
Extract USB keystrokes from pcap
#!/usr/bin/python
# -*- coding: utf-8 -*-
KEY_CODES = {
0x04: ['a', 'A'], 0x05: ['b', 'B'], 0x06: ['c', 'C'], 0x07: ['d', 'D'], 0x08: ['e', 'E'], 0x09: ['f', 'F'],
0x0A: ['g', 'G'], 0x0B: ['h', 'H'], 0x0C: ['i', 'I'], 0x0D: ['j', 'J'], 0x0E: ['k', 'K'], 0x0F: ['l', 'L'],
0x10: ['m', 'M'], 0x11: ['n', 'N'], 0x12: ['o', 'O'], 0x13: ['p', 'P'], 0x14: ['q', 'Q'], 0x15: ['r', 'R'],
0x16: ['s', 'S'], 0x17: ['t', 'T'], 0x18: ['u', 'U'], 0x19: ['v', 'V'], 0x1A: ['w', 'W'], 0x1B: ['x', 'X'],
0x1C: ['y', 'Y'], 0x1D: ['z', 'Z'], 0x1E: ['1', '!'], 0x1F: ['2', '@'], 0x20: ['3', '#'], 0x21: ['4', '$'],
0x22: ['5', '%'], 0x23: ['6', '^'], 0x24: ['7', '&'], 0x25: ['8', '*'], 0x26: ['9', '('], 0x27: ['0', ')'],
0x28: ['\n', '\n'], 0x2C: [' ', ' '], 0x2D: ['-', '_'], 0x2E: ['=', '+'], 0x2F: ['[', '{'], 0x30: [']', '}'],
@dubs3c
dubs3c / backup.sh
Created September 9, 2017 12:00
Database backup and verification using Docker.
#!/bin/bash
# Get current date with format: Y-m-d_HMS
date=$(date +%Y-%m-%d_%H%M%S);
# Backup location
BACKUP_LOC='/srv/postgres/';
DB_SUCCESS='success/';
DB_UNTESTED='untested/';
DB_FAILED='failed/';

Keybase proof

I hereby claim:

  • I am mjdubell on github.
  • I am mjdubell (https://keybase.io/mjdubell) on keybase.
  • I have a public key ASAAyae7q2ToEoENvsL6Af6aqH5w3-7R_MBDyc8Q4P48lAo

To claim this, I am signing this object:

@dubs3c
dubs3c / teamspeak3_install.sh
Created October 12, 2015 19:14
Teamspeak 3 install
#!/bin/bash
# Make sure only root can run our script
if [[ $EUID -ne 0 ]]; then
echo "[-] This script must be run as root"
exit 1
fi
# Download teamspeak
wget http://dl.4players.de/ts/releases/3.0.11.4/teamspeak3-server_linux-amd64-3.0.11.4.tar.gz
@dubs3c
dubs3c / sublime user config
Created May 19, 2015 08:18
User settings for sublime text 3
{
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Afterglow/Afterglow-monokai.tmTheme",
"font_face": "Source Code Pro",
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"