Skip to content

Instantly share code, notes, and snippets.

Tyler Kerr tylerkerr

Block or report user

Report or block tylerkerr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tylerkerr
tylerkerr / hibp.py
Created Jan 22, 2019
check haveibeenpwned's API for passwords
View hibp.py
#!/usr/bin/env python3
import hashlib
from getpass import getpass
from requests import get
'''troy hunt runs haveibeenpwned.com. he collects huge dumps of breached passwords,
and has made them available. you can download the entire dump of hashes (annoying),
or you can query his API directly. doing this on his website involves typing in the
actual candidate password you want to check and assuming nothing untoward happens.
View apple-battery-time-remaining.sh
function battime()
{
minutes=$(/usr/sbin/ioreg -r -n AppleSmartBattery | grep InstantTimeToEmpty | \grep -Eo "\d+")
hours=$(echo "$minutes / 60" | bc)
remainder=$(echo "$minutes - (60 * $hours)" | bc)
echo "[+] battery time remaining : ${hours}h ${remainder}m"
}
View onion-lentil-curry.md

Lentils My Wife

Ingredients

  • 2 cups red lentils
  • 4 cups water
  • 1.5 veggie bouillon cubes
  • 1.5 cups chopped sauteed onion
  • 1 tablespoon butter
  • 2 tablespoons yellow curry powder
  • 0.5 tablespoon dried hot pepper flakes
@tylerkerr
tylerkerr / print.c
Created Feb 15, 2018
normal printing to stdout
View print.c
#include <stdlib.h>
int main(void)
{
char toprint[56] = "python -c 'import os; os.system(\"echo $(printf howdy)\")'";
system(toprint);
}
View how to get Cisco ASDM-IDM Launcher to run on MacOS.md

inside the application package, open dm-launcher.sh and change the line reading VMOPTIONS="`/usr/libexec/PlistBuddy -c "Print :VMOptions" "$PINFO_PLIST_FILE"`"

to

VMOPTIONS="-Dhttps.protocols=TLSv1.1 -Dhttps.cipherSuites=TLS_RSA_WITH_AES_128_CBC_SHA -Xms64m -Xmx512m"

View bart.py
from flask import Flask
from flask import request
from requests import post
from slackclient import SlackClient
from datetime import datetime
import re
import os
import json
app = Flask(__name__)
@tylerkerr
tylerkerr / makemac.py
Last active May 16, 2018
quick MAC address formatter. it's really annoying to manually insert/remove colons
View makemac.py
#!/usr/bin/env python3
import sys
import argparse
import subprocess
import re
def cleanmac(mac):
return re.sub('[^0-9a-f]', '', mac.lower())
View ciphercel.py
#!/usr/bin/env python3
import re
import os
import sys
import random
from itertools import chain, product
testkey = 'q w e r'
message = 'ta kzxwgpdjtctpf prozif, d nop zs adpgidc agxjoin tn kdccom iokgintho, kzxwgpdjco zi moktmdjco ts proio tn da dcyzitprx ertkr poixtadpon dspoi d statpo dxzgap zs ptxo (ertkr xdf mowoam za pro ythoa agxjoi) dam kziiokpcf moktmon eroproi d ythoa agxjoi joczayn pz pro nop.'
@tylerkerr
tylerkerr / makemac.py
Last active Sep 8, 2017
turns whatever format of MAC address (AA-BB-CC, aa:bb:cc, etc) into either cisco format (abcd.1234.1234) or MS DHCP format (abcd12341234)
View makemac.py
#!/usr/bin/env python3
import sys
import argparse
import re
def cleanmac(mac):
return re.sub('(\.|-| |\:)', '', mac)
def checkmac(mac):
View chili.md

chili

Shopping List

  • 2 medium/large spanish onions
  • 8 cloves garlic
  • 2lbs lean (80%) ground beef
  • 2x 800ml cans dark red kidney beans
  • 2x 680ml cans tomato sauce ("all-purpose", the kind with spices and no chunks)
  • whatever spices below that you don't already have
You can’t perform that action at this time.