Skip to content

Instantly share code, notes, and snippets.

View jgamblin's full-sized avatar

Jerry Gamblin jgamblin

View GitHub Profile
@jgamblin
jgamblin / certstream-slack.py
Created February 26, 2018 16:32
A script to search CTLogs for keywords and post new certs to a slack channel.
# coding=utf-8
import certstream
import json
import requests
# Get the webhook_url here:
# https://my.slack.com/services/new/incoming-webhook/
@jgamblin
jgamblin / antiautosploit.py
Last active June 1, 2023 01:57
Blocks Shodan IPs From Scanning Your Servers.
#!/usr/bin/python3
import os
shodan = ["104.131.0.69", "104.236.198.48", "155.94.222.12","155.94.254.133", "155.94.254.143", "162.159.244.38", "185.181.102.18", "188.138.9.50", "198.20.69.74", "198.20.69.98", "198.20.70.114", "198.20.87.98", "198.20.99.130", "208.180.20.97", "209.126.110.38", "216.117.2.180", "66.240.192.138", "66.240.219.146", "66.240.236.119", "71.6.135.131", "71.6.146.185", "71.6.158.166", "71.6.165.200", "71.6.167.142", "82.221.105.6", "82.221.105.7", "85.25.103.50", "85.25.43.94", "93.120.27.62", "98.143.148.107", "98.143.148.135"]
for ip in shodan:
os.system("iptables -A INPUT -s {} -j DROP".format(ip))
@jgamblin
jgamblin / domains.sh
Created December 20, 2017 20:37
Open Websites In Firefox from List.
#!/bin/bash
filename="domains.txt"
while read -r line
do
name="$line"
open -a "Firefox" https://$name
done < "$filename"
@jgamblin
jgamblin / brew.sh
Last active May 31, 2019 18:01
Configure Brew on MacOS and install utilities.
#!/bin/bash
#Check If Brew Is Installed
if ! [ -x "$(command -v brew)" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
brew update
brew upgrade
fi
@jgamblin
jgamblin / unsplashbackground.sh
Created November 12, 2017 02:33
Download an amazing image from unsplash and set it as the background.
#!/bin/bash
mkdir -p ~/Pictures/Wallpapers/unsplash
rm -f ~/Pictures/Wallpapers/unsplash/"$(date +%F)".png
curl -s -L -o ~/Pictures/Wallpapers/unsplash/"$(date +%F)".png "https://unsplash.it/2560/1600/?random" > /dev/null
osascript -e "tell application \"System Events\" to set picture of every desktop to \"~/Pictures/Wallpapers/unsplash/$(date +%F).png\""
killall Dock
@jgamblin
jgamblin / digicertacm.sh
Created November 4, 2017 23:52
Automating Digicert Certificates Into AWS ACM
#!/bin/bash
#Required
apikey=
domain=
commonname=$1
orgid=
#Change to your company details
country=
@jgamblin
jgamblin / ssn.sh
Created September 8, 2017 11:51
Generate Every SSN
#!/bin/bash
for X in {0..9}{0..9}{0..9}-{0..9}{0..9}-{0..9}{0..9}{0..9}{0..9}
do echo $X
done
@jgamblin
jgamblin / gnmap2csv.sh
Last active March 30, 2023 17:16
Transform a GNMAP file to a CSV.
#!/bin/bash
##########################################
# 2015 Mike Piekarski
# mike [-at-] automagine [-dot-] com
# Automagine, LLC
# --
# Greppable NMAP to CSV parser
# --
# A simple way to convert one or more gnmap files into a csv
# --
@jgamblin
jgamblin / scan.sh
Last active February 5, 2020 20:12
Continual Nmap With Slack Alerting.
#!/bin/bash
#
# Requires NMAP, NDIFF and Slackcli
# https://candrholdings.github.io/slack-cli/
# TARGETS should be set by env variable
# INTERVAL how many seconds to wait between scans
# SLACKTOKEN from here https://api.slack.com/web
TARGETS="scanme.handsonhacking.org"
@jgamblin
jgamblin / randommac.applescript
Last active June 12, 2018 23:49
MAC Address Randomization for MacOS
on run {input, parameters}
delay 4
tell application "Terminal"
activate
end tell
tell application "System Events"
delay 0.3