Skip to content

Instantly share code, notes, and snippets.

View lanrat's full-sized avatar
😎
👨‍💻

Ian Foster lanrat

😎
👨‍💻
View GitHub Profile
@lanrat
lanrat / smtp-revoke.sh
Last active April 9, 2018 19:02
Check SMTP server revocation status
#!/usr/bin/env bash
if [ "$#" -eq 0 ];
then
echo "pass host to scan"
exit 1
fi
server=$1
mxserver=`dig mx $server +short 2>/dev/null | tail -1 | cut -d ' ' -f2`
@lanrat
lanrat / tesla.json
Created September 15, 2017 23:48
Tesla CertGraph
{
"certgraph": {
"command": "./certgraph -ct -ct-subdomains -depth 3 -details -json tesla.com",
"options": {
"ct": true,
"ct_subdomains": true,
"depth": 3,
"parallel": 10,
"port": "443",
"starttls": false,
@lanrat
lanrat / certificate-transparency.json
Created June 1, 2017 20:47
certificate-transparency json graph
{
"links": [
{
"source": "txvia.com",
"target": "8816A9C0CA6C22E0D2BAA9BFFF419FE3E4EC1F80EF4BB90DD4F09E12AD3A80B9",
"type": "uses"
},
{
"source": "8816A9C0CA6C22E0D2BAA9BFFF419FE3E4EC1F80EF4BB90DD4F09E12AD3A80B9",
"target": "1hourpersecond.com",
@lanrat
lanrat / alsa.sh
Created April 4, 2017 20:51
Force ALSA to play nice with BT headset
#! /usr/bin/env bash
# info: https://wiki.archlinux.org/index.php/Bluetooth_headset#Troubleshooting
set -eu
DEVICE_NAME="PLT_BBTPRO"
reset_bt()
{
# turn card off
CARD=$(pactl list cards short | cut -f2 | grep blue | head -1)
@lanrat
lanrat / crop.sh
Created April 17, 2014 02:31
script to crop PDFs with briss
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BRISS="${DIR}/briss-0.9-sakin-1/briss-0.9.jar"
JPATH="$(which java)"
#get list of all non-cropped PDFs
pdfs="$(find ${DIR} -type f -name "*.pdf" | grep -v "cropped")"
#number of documents cropped
count=0
@lanrat
lanrat / DVR_exploit.py
Created December 22, 2016 22:27
TRIPLEX DVRLink DVR468RW Exploit
#!/usr/bin/env python
import socket
import binascii
import sys
import time
def passList():
n = 1
li = [1]
while (int(li[-1]) <= 44444444):
@lanrat
lanrat / sfdc-do.json
Created December 1, 2016 20:11
test json for sfdc-do
{
"links": [
{
"source": "salesforce.com",
"target": "6E77EAF8790D4E0959E5CB0B8788A12DD160294787BC5BE74BC79F30FBF345F8",
"type": "uses"
},
{
"source": "6E77EAF8790D4E0959E5CB0B8788A12DD160294787BC5BE74BC79F30FBF345F8",
"target": "chatter.com",
@lanrat
lanrat / config.json
Created November 8, 2016 00:10
runc on 2.6.32
{
"ociVersion": "1.0.0-rc2-dev",
"platform": {
"os": "linux",
"arch": "amd64"
},
"process": {
"terminal": true,
"consoleSize": {
"height": 0,
@lanrat
lanrat / whitehouse.json
Created October 28, 2016 22:23
Whitehouse Cert Graph
{
"links": [
{
"source": "api2.whitehouse.gov",
"target": "FDEA7DD78434894C449D32A933BF2421E7AE61C0CE6ED38CF1E49DA0675BEF5A",
"type": "uses"
},
{
"source": "FDEA7DD78434894C449D32A933BF2421E7AE61C0CE6ED38CF1E49DA0675BEF5A",
"target": "whitehouse.gov",
@lanrat
lanrat / eff.json
Created October 26, 2016 19:43
Eff Cert Graph
{
"links": [
{
"source": "staging.eff.org",
"target": "AC3933B1B95BA5254F43ADBE5E3E38E539C74456EE2D00493F0B2F38F991D54F",
"type": "uses"
},
{
"source": "AC3933B1B95BA5254F43ADBE5E3E38E539C74456EE2D00493F0B2F38F991D54F",
"target": "leez-dev-supporters.eff.org",