Skip to content

Instantly share code, notes, and snippets.

View jgamblin's full-sized avatar

Jerry Gamblin jgamblin

View GitHub Profile
@jgamblin
jgamblin / Sysinfo.sh
Last active August 8, 2023 06:46
A Bash Script To Get System Information For OSX.
#!/bin/bash
# You Will need to install iStats
# gem install istats
echo && echo ———————-System Information:——————— &&
/bin/echo -n "Uptime: " && uptime | awk '{print $3}'
echo
/bin/echo -n "CPU Usage: " && top -l 1 | awk '/CPU usage/ {print $3}'
/bin/echo -n "CPU Temp: " && istats | grep CPU\ temp | awk '{print $3}'
/bin/echo -n "FAN Speed: " && istats | grep Fan\ 0\ speed: | awk '{print $4,$5}'
@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 / slackmap.sh
Created November 5, 2016 21:55
Script to NMAP a network and Post Differences to Slack
#!/bin/sh
TARGETS="192.168.1.0/24"
OPTIONS="-v -T4 -F -sV"
date=$(date +%Y-%m-%d-%H-%M-%S)
cd /nmap/diffs
nmap $OPTIONS $TARGETS -oA scan-$date > /dev/null
slack(){
curl -F file=@diff-$date -F initial_comment="Internal Port Change Detected" -F channels=#alerts -F token=xxxx-xxxx-xxxx https://slack.com/api/files.upload
}
@jgamblin
jgamblin / digicert.sh
Created April 3, 2017 22:18
Request, Approve and Download Digicert TLS Cert
#!/bin/bash
#Required
apikey=*YourAPIKey*
domain=*YourOrgDomain*
commonname=$(hostname --fqdn)
orgid=*YourOrgID*
#OV or EV or Private
cert_type=ov
@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 / CVEsPublished.ipynb
Last active February 2, 2023 14:00
When Are CVEs Published?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jgamblin
jgamblin / burpsettings.json
Created April 17, 2017 13:04
Burp Settings JSON
{
"project_options":{
"connections":{
"hostname_resolution":[],
"out_of_scope_requests":{
"drop_all_out_of_scope":false,
"exclude":[
{
"enabled":true,
"file":"logout",
@jgamblin
jgamblin / readme.md
Last active October 5, 2022 10:55
Bot that posts SSH logins to slack.

SSH Slackbot

This is a simple slackbot to post successful SSH logins to a slack channel to help you keep track of server access.

Step 1

Create an incoming webhook for your slack community.

Step 2

Create /etc/ssh/sshslack.sh

@jgamblin
jgamblin / slackoutlook.scpt
Created April 19, 2017 12:39
Set your slack status based on Outlook calendar.
launch application "Microsoft Outlook"
launch application "Slack"
property startDate : current date
property endDate : startDate + (10 * minutes)
property cachedStatus : ""
property results : {}
property running : true
global emailAddress
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.