Skip to content

Instantly share code, notes, and snippets.

View 9b's full-sized avatar
🐗
Creating.

Brandon Dixon 9b

🐗
Creating.
View GitHub Profile
@9b
9b / glassdoor-salary-scraper.py
Created April 17, 2017 03:02
Extract median, min and max pay data from Glassdoor for a given set of job titles.
"""Extract median, min and max pay data from Glassdoor for a given set of job titles."""
from bs4 import BeautifulSoup
import requests
import sys
USER_AGENT = ("Mozilla/5.0 (Windows NT 6.1) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/41.0.2228.0 Safari/537.36")
@9b
9b / linkedin-auto-endorse.js
Last active April 5, 2017 20:30
Auto-endorse connection top 3 skills when viewing their profile. This snippet requires TamperMonkey (https://tampermonkey.net/).
// ==UserScript==
// @name Auto-endorse LinkedIn Connections
// @require https://code.jquery.com/jquery-1.9.1.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @version 0.6
// @description Automatically endorse the user we are viewing for their top skills
// @author Brandon Dixon (@9bplus)
// @grant none
// @include https://www.linkedin.com/*
// ==/UserScript==
We can't make this file beautiful and searchable because it's too large.
google.com,"v=spf1 include:_spf.google.com ~all"
youtube.com,"google-site-verification=OQz60vR-YapmaVrafWCALpPyA8eKJKssRhfIrzM-DJI"
youtube.com,"v=spf1 include:google.com mx -all"
facebook.com,"v=spf1 redirect=_spf.facebook.com"
baidu.com,"google-site-verification=GHb98-6msqyx_qqjGl5eRatD3QTHyVB6-xQ3gJB5UwM"
baidu.com,"v=spf1 include:spf1.baidu.com include:spf2.baidu.com include:spf3.baidu.com a mx ptr -all"
yahoo.com,"v=spf1 redirect=_spf.mail.yahoo.com"
wikipedia.org,"google-site-verification=AMHkgs-4ViEvIJf5znZle-BSE2EPNFqM1nDJGRyn2qk"
wikipedia.org,"v=spf1 include:wikimedia.org ?all"
amazon.com,"v=spf1 include:spf1.amazon.com include:spf2.amazon.com include:amazonses.com -all"
@9b
9b / automator-bepush.py
Created July 17, 2016 03:33
Automate BePush indicator processing based on PassiveTotal monitor notifications.
#!/usr/bin/env python
"""PassiveTotal script to automate BePush processing based on monitors.
This script will query for the items in your account monitor list and use those
values in order to get all passive DNS notifications. Each notification will be
processed which includes tagging, classifying and sharing out to Facebook's
ThreatExchange. Running this script daily will essentially automate most of the
work required to keep up with BePush.
"""
@9b
9b / coffeeReviews.py
Created October 28, 2014 19:19
Parse out reviews from www.coffeereviews.com into a structured format.
import requests, sys, cPickle, os
from BeautifulSoup import BeautifulSoup
from pymongo import MongoClient
headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36' }
def pickleIt(fname, data):
'''
Take the contents of a variable and save it to the filesystem for later use
@todo handle actual exceptions and consider tracking success
Subdomain Resolve First Last Source
jdk-7u12-windows-i586 210.253.96.200 2014-10-02 12:16:03 2014-10-03 12:16:08 --
jre 210.253.99.103 2014-10-01 10:41:54 2014-10-03 11:46:21 --
ud 119.205.217.104 2014-10-01 10:41:53 2014-10-03 11:46:21 --
www 96.7.111.133 2014-10-01 10:41:54 2014-10-03 11:46:20 --
kr 202.181.133.215 2014-10-01 10:41:54 2014-10-03 11:46:20 --
up 210.253.99.103 2014-10-01 10:41:54 2014-10-03 11:46:20 --
ns 10.0.1.9 2014-10-01 10:41:53 2014-10-03 11:46:20 --
ga 121.78.246.174 2014-10-01 10:41:53 2014-10-03 11:46:19 --
idc 112.175.143.2 2014-10-01 10:41:54 2014-10-03 11:46:19 --
@9b
9b / keybase.md
Last active August 29, 2015 14:07

Keybase proof

I hereby claim:

  • I am 9b on github.
  • I am 9bplus (https://keybase.io/9bplus) on keybase.
  • I have a public key whose fingerprint is 7C67 B211 AB17 A13C 6749 F401 3ED9 7935 90AB 32C7

To claim this, I am signing this object:

@9b
9b / k10.py
Last active September 20, 2015 16:53
import datetime, re, difflib
def k10(stack):
if len(stack) <= 1:
return
checkHashes, checkDuplicates, checkDelta, checkName = True, True, True, True
score, dCount, fCount, deltaScore, fnameScore, chainAverage = 65, 0, 0, 0, 0, 0
duplicates, dChain, fChain, features = [], [], [], [ 'valid_filenames' ]
@9b
9b / dump.csv
Last active August 29, 2015 14:02
PassiveTotal Dump of BOUNDLESSINFORMANT IP Data
COUNTRY PROJECT IP DOMAIN FIRST LAST
UK ACRIDMINI 146.185.26.163 uk2.bluewebx.com 2012-10-26 12:44:50 2013-01-29 02:13:43
UK CROSSEYEDSLOTH 212.118.232.184 hikemasat.dyndns.org 2012-04-16 08:24:35 2012-04-16 08:43:10
UK WAXTITAN 31.6.17.94 sokrates.homeunix.net 2012-08-30 16:46:47 2012-08-31 16:34:07
UK MAGNUMOPUS 37.130.229.101 uk-server.vpnmakers.com 2012-06-16 05:36:18 2012-11-07 11:54:10
UK MAGNUMOPUS 37.130.229.101 uk.hidethisip.info 2012-07-30 21:07:23 2013-02-15 09:34:28
UK MAGNUMOPUS 37.130.229.101 uk.myfastport.com 2012-08-04 16:30:50 2013-03-10 16:25:31
UK MAGNUMOPUS 37.130.229.101 uk.vpnmakers.com 2012-06-09 04:28:18 2013-03-16 16:51:12
UK MAGNUMOPUS 37.130.229.101 ipsec.lon.witopia.net 2013-05-12 22:53:03 2013-06-02 18:15:18
UK MAGNUMOPUS 37.130.229.101 ipsec.london.witopia.net 2013-05-12 19:11:54 2013-06-04 07:23:23
import requests, json, logging, sys
class PassiveTotal:
def __init__(self, apikey):
self.__apikey = apikey
self.__classifications = [ 'targeted', 'crime', 'benign', 'multiple' ]
self.__actions = [ 'add', 'remove' ]