Skip to content

Instantly share code, notes, and snippets.

View couchfault's full-sized avatar

Henry Pitcairn couchfault

View GitHub Profile
@couchfault
couchfault / getmusic.py
Created April 24, 2016 23:08
Scrape songs from youtube search results and download them as mp3s (requires ffmpeg and youtube-dl)
#!/usr/bin/env python
import sys, subprocess, urllib
CMD = ['youtube-dl', '--max-downloads', '1', '--extract-audio', '--audio-format', 'mp3', '-o', '[terms].%(ext)s', 'https://www.youtube.com/results?search_query=[terms]&page=1']
def main(args):
terms = ' '.join(args[1:])
if len(args) < 2:
terms = raw_input('Search Query: ')
cmd = CMD
class Class(object):
def __init__(self):
super(Class, self).__init__()
self.name = "test"
self.command_list = ['ls','pwd','rm',nano']
def run(self):
print "--------"
print self.name
def commands(self):
@couchfault
couchfault / keybase.md
Last active January 17, 2016 15:37
Keybase Proof

Keybase proof

I hereby claim:

  • I am 735tesla on github.
  • I am tesla (https://keybase.io/tesla) on keybase.
  • I have a public key ASC5K6DRud2OGGLTcZJyJhtgnJ59NqtAqGEGBE9XQfAwHgo

To claim this, I am signing this object:

@couchfault
couchfault / rot13.c
Created April 9, 2015 13:07
Rot13 algorithm
#include <string.h>
char rot13(char c) {
return (c < 65 || (c > 90 && c < 97) || (c > 122)) ? c : (c+13 > 90 && c < 97) || (c+13 > 122) ? c-13 : c+13;
}
void rot13_s(char * buf) {
unsigned long len = strlen(buf);
for (int i=0; i < len; ++i)
buf[i] = rot13(buf[i]);
}
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/Users/tesla/.rvm/rubies/ruby-1.9.3-p550 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared
## --------- ##
## Platform. ##
[2014-12-08 08:37:30] ./configure
current path: /Users/tesla/.rvm/src/ruby-1.9.3-p550
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/usr/local/opt/ruby193/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/usr/local/MacGPG2/bin:/Users/tesla/.rvm/bin:/Users/tesla/.rvm/bin:/Users/tesla/.rvm/bin:/Users/tesla/.rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/usr/local/MacGPG2/bin:/Users/tesla/.rvm/bin:/Users/tesla/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/usr/local/MacGPG2/bin:/Users/tesla/.rvm/bin:/Users/tesla/.rvm/bin
comm
#!/bin/bash
if [ "$(whoami)" = 'root' ]; then
echo "[!] Running as root"
echo "[!] This will alter root's ~/.bash_profile, not yours"
echo "[!] press CTRL-c in the next 3 seconds if this is not what you intend."
sleep 3
fi
has_brew=true
if [[ ! `which brew` ]]; then
has_brew=false
@couchfault
couchfault / keybase.md
Created September 23, 2014 02:36
keybase.md

Keybase proof

I hereby claim:

  • I am 735tesla on github.
  • I am tesla (https://keybase.io/tesla) on keybase.
  • I have a public key whose fingerprint is 8010 4C4C 7FBE 8218 382A 72D7 93F3 D7B9 7633 B3BF

To claim this, I am signing this object:

require 'msf/core'
class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::HttpServer::HTML
def initialize(info = {})
super(update_info(info,
'Name' => 'Multi browser web-based protocol handler iframe annoyance/DoS',
'Description' => %q{
This takes advantage of web-based protocol handlers in certain browsers (esp. Safari)
to open excessive popups and consume system resources. In some cases the browser may
@couchfault
couchfault / bannergrab.rb
Last active September 26, 2016 11:40
Banner grabbing module for metasploit based off of HD Moore's banner-plus.nse (see github.com/hdm)
require 'msf/core'
require 'strscan'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp
include Msf::Auxiliary::Scanner
include Msf::Auxiliary::Report
def initialize
super(
'Name' => 'TCP Banner Grabbing Module',
'Version' => '$Revision: 1 $',