Skip to content

Instantly share code, notes, and snippets.

View jgamblin's full-sized avatar

Jerry Gamblin jgamblin

View GitHub Profile
@jgamblin
jgamblin / snow.sh
Created December 21, 2016 14:26
Make It Snow In the Terminal
yes $COLUMNS $LINES|pv -qL50|perl -ne'$|=1;($c,$r)=split;$s||=$"x($c*$r);print$s;$s=$"x$c.$s;substr$s,rand$c,1,"*";$s=substr$s,0,$c*$r+$c;'
@jgamblin
jgamblin / l33tpassword.py
Created February 10, 2017 20:45
L33TPasswords.py
with open('passwords.txt') as p:
for line in p:
new_string=line
replacements = ( ('a','4'), ('e','3'), ('l','1'), ('o','0'), ('t','+') )
for old, new in replacements:
new_string = new_string.replace(old, new)
print new_string,
@jgamblin
jgamblin / badge.py
Created February 15, 2017 19:30
BSIDESSF Electronic Badge Code
#!/usr/bin/python
import logging
logging.basicConfig(
filename='/var/bsides/log',
level=logging.DEBUG,
format='%(asctime)s [%(levelname)s] %(message)s'
)
import sys
import os.path
from luma.core.serial import i2c
@jgamblin
jgamblin / censys_asa.py
Last active February 18, 2017 19:53
Quickly and dirtily get exposed ASA interfaces from the Censys API
#!/usr/bin/env python
"""Quickly and dirtily get exposed ASA interfaces from the Censys API.
Usage: python censys_asa.py > censys_asa.txt"""
import os
import sys
import json
import requests
import yaml
@jgamblin
jgamblin / pi.sh
Created March 15, 2017 15:00
This script just scrolls a billion digits of pi continually.
#!/bin/bash
# This script just scrolls a billion digits of pi continually.
while true; do
curl -l https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt
done
@jgamblin
jgamblin / domains.sh
Last active April 14, 2017 04:36
Small Script To Search For Keywords In Domains Registered Today
#!/bin/bash
#requires curl and jq
search="$1"
curl -s 'https://domainpunch.com/premium/lib/php/ajax/grid.php?cmd=wordmon&columns=id,name,zoneid,length,idn,&_search=true&nd=1492088036460&rows=1000&page=1&sidx=length&sord=asc&filters=%7B%22groupOp%22%3A%22AND%22%2C%22rules%22%3A%5B%7B%22field%22%3A%22name%22%2C%22op%22%3A%22cn%22%2C%22data%22%3A%22'$search'%22%7D%5D%7D' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Referer: https://domainpunch.com/premium/wordmon.php' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --compressed | jq -C -r '.rows[]?.name'
@jgamblin
jgamblin / searchcisco.r
Last active April 29, 2017 21:55
Search Cisco Top 1,000,000 Domains ForA KeyWord, Do GeoIP Lookup & Build A Map.
library(leaflet)
library(ipapi)
#devtools::install_github("hrbrmstr/ipapi")
library(tidyverse)
# Get Top 25,000 Cisco Domains
if (file.exists(fn)) file.remove(fn)
temp <- tempfile()
download.file("http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip",temp)
unzip(temp, "top-1m.csv")
@jgamblin
jgamblin / cisco25k.r
Last active April 29, 2017 21:55
Do GeoIP Lookup & Build A Map of Ciscos 25,000 Top DNS Names.
library(leaflet)
library(ipapi)
#devtools::install_github("hrbrmstr/ipapi")
library(tidyverse)
# Get Top 25,000 Cisco Domains
if (file.exists(fn)) file.remove(fn)
temp <- tempfile()
download.file("http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip",temp)
unzip(temp, "top-1m.csv")
@jgamblin
jgamblin / apriltomay.r
Created May 1, 2017 11:29
Find Domains That Were Not On The April 1st List.
library(leaflet)
library(tidyverse)
library(virustotal)
library(rdomains)
library(ipapi)
#devtools::install_github("hrbrmstr/ipapi")
# Search The Domains:
if (file.exists(fn)) file.remove(fn)
temp <- tempfile()
@jgamblin
jgamblin / finddomains.r
Last active May 4, 2017 00:28
Find All Domains With A Keyword and Map The Live Ones.
library(leaflet)
library(tidyverse)
library(httr)
library(rvest)
library(jsonlite)
library(ipapi)
#devtools::install_github("hrbrmstr/ipapi")
#Find geo Containing Key Word