View netblock-from-whois
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# | |
# MIT License | |
# | |
# Copyright (c) 2022 Jay Caines-Gooby, @jaygooby, jay@gooby.org | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
View what-user-agent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to https://github.com/jaygooby/what-user-agent |
View log4j-jndi.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# log4j jndi exploit CVE-2021-44228 filter | |
# Save this file as /etc/fail2ban/filter.d/log4j-jndi.conf | |
# then copy and uncomment the [log4j-jndi] section | |
# to /etc/fail2ban/jail.local | |
# | |
# jay@gooby.org | |
# https://jay.gooby.org/2021/12/13/a-fail2ban-filter-for-the-log4j-cve-2021-44228 | |
# https://gist.github.com/jaygooby/3502143639e09bb694e9c0f3c6203949 | |
# Thanks to https://gist.github.com/kocour for a better regex | |
# |
View kaslurp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now https://github.com/jaygooby/kaslurp |
View interesting-referers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# MIT License | |
# | |
# Copyright (c) 2021 Jay Caines-Gooby, @jaygooby, jay@gooby.org | |
# | |
# The one-liner from https://jay.gooby.org/2021/11/30/find-interesting-referers-in-access-log | |
# | |
# Usage: interesting-referers /path/to/access.log | |
# interesting-referers /path/to/access.log example.com |
View unknown-host
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# https://jay.gooby.org/2021/02/10/unknown-host | |
# | |
# Use this to remove the offending line from your | |
# ~/.ssh/known-hosts file when you know the host | |
# has actually changed and you get the | |
# | |
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
# @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ |
View nginx-google-domain-csp-map.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Generates an nginx compatible map that you can use to | |
# put the relevant Google country code in your Content-Security-Policy | |
# instead of having them all. | |
# | |
# Add these to your nginx config: | |
# geoip2 /path/to/GeoLite2-Country.mmdb { | |
# $geoip2_country_code default=US source=$remote_addr country iso_code; | |
# $geoip2_country_name country names en; |
View membash.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Gist: 11375877 | |
# Url: https://gist.github.com/goodevilgenius/11375877 | |
# | |
# All memcache functions are supported. | |
# | |
# Can also be sourced from other scripts, e.g. | |
# source membash.sh | |
# MCSERVER="localhost" |
View src-hilite-lesspipe.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Based on http://git.savannah.gnu.org/cgit/src-highlite.git/tree/src/src-hilite-lesspipe.sh.in | |
# by Lorenzo Bettini | |
# | |
# Modified by Jay Caines-Gooby to support piped files | |
# jay@gooby.org | |
# @jaygooby | |
# | |
# Typically called by setting: |
View mysql-health-check.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A very basic mysql health check that can be used by e.g. | |
# Consul's External Service Monitor | |
# | |
# Cobbled together by @jaygooby from a combination of: | |
# Unai Rodriguez's and Alex Williams' | |
# https://gist.github.com/aw/1071144 | |
# and George Chilumbu's | |
# https://georgechilumbu.wordpress.com/2017/07/27/setup-a-consul-client/ | |
# | |
# This script checks if a mysql server is healthy running on $MYSQL_HOST. |
NewerOlder