Skip to content

Instantly share code, notes, and snippets.

@glennzw
glennzw / checkSubmitted.js
Created November 3, 2020 18:15
Poll gophish campaign for submitted data
/*
e.g output:
benjaminsteele@widgets.com submitted data at November 3rd 2020, 7:12:25 pm
morganatkinson@widgets.com submitted data at October 1st 2020, 6:15:48 pm
muhammadrose@widgets.com submitted data at October 1st 2020, 6:15:41 pm
alfiemoran@widgets.com submitted data at October 1st 2020, 6:13:52 pm
*/
@glennzw
glennzw / heroku.txt
Created May 28, 2020 10:23
Deploy to Heroku
Create Herokuapp:
1. Create repo
mkdir derp
cd derp
touch derp.go
echo "web: derp" > Procfile
@glennzw
glennzw / getProcs.ps1
Created November 9, 2018 14:14
Powershell to create a CSV list of processes
(ps|sort name|gu|ft -HideTableHeaders -Property Name |Out-String).Trim() -replace "\s+", ","
@glennzw
glennzw / getFBProfilePhoto.py
Created April 14, 2018 19:54
Hack to allow us to load icon images in Maltego by following the redirect and serving up the actual image.
#!/usr/env/python
# -*- coding: utf-8 -*-
# Hack to allow us to load icon images in Maltego by following
# the redirect and serving up the actual image.
from flask import Flask, send_file
import requests
app = Flask(__name__)
@app.route('/fb/pic/<id>')

Keybase proof

I hereby claim:

  • I am glennzw on github.
  • I am glennzw (https://keybase.io/glennzw) on keybase.
  • I have a public key ASCtulQWaZSDBFFdhN72CTGtGzo2u1WWOweVoumB7mHRKAo

To claim this, I am signing this object:

@glennzw
glennzw / sslChequer.py
Created October 11, 2016 19:54
Check SSL certificate properties of a host
#!/usr/bin/python
# Check SSL certificate properties
from socket import socket, setdefaulttimeout
import ssl
import OpenSSL
from dateutil.parser import parse
import datetime
import csv
import calendar
import time
@glennzw
glennzw / autoDerper.py
Created October 11, 2016 19:48
Check if a host has Outlook Web Access (OWA).
#!/usr/bin/python
# Check if a host has OWA
import requests
import dns.resolver
import csv
import sys
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
@glennzw
glennzw / bounceCheck.py
Created July 21, 2016 23:27
Monitor bounces from Amazon SES
#!/usr/bin/python
import boto.ses
import time
AWS_ACCESS_KEY = 'xxx'
AWS_SECRET_KEY = 'xxx'
conn = boto.ses.connect_to_region("us-west-2",aws_access_key_id=AWS_ACCESS_KEY, aws_secret_access_key=AWS_SECRET_KEY)
while True:
@glennzw
glennzw / readFile.py
Created July 2, 2016 16:04
Reading non-ascii CSV file in Python
#e.g. file:
# 13893,Mickey,Brady,Sinn Féin,Newry and Armagh
import csv
import codecs
def unicode_csv_reader(unicode_csv_data, dialect=csv.excel, **kwargs):
# csv.py doesn't do Unicode; encode temporarily as UTF-8:
csv_reader = csv.reader(utf_8_encoder(unicode_csv_data),
@glennzw
glennzw / isUp.sh
Created June 15, 2016 11:45
Check if site up
#!/bin/bash
if curl -s http://www.isup.me/$1 | grep -q "It's just you"; then echo $1 is up; else echo $1 is down; fi