Skip to content

Instantly share code, notes, and snippets.

View rthallisey's full-sized avatar

Ryan Hallisey rthallisey

View GitHub Profile
@rthallisey
rthallisey / getbadguys.sh
Created February 8, 2020 23:10 — forked from JeremyMorgan/getbadguys.sh
Get a list of IP addresses trying to attack your CentOS server
#/usr/bin/bash
# strings to look for in our file
# Note: you could just parse the whole file. But if you put in a bad password your IP
# could end up on the bad guy list
declare -a badstrings=("Failed password for invalid user"
"input_userauth_request: invalid user"
"pam_unix(sshd:auth): check pass; user unknown"
"input_userauth_request: invalid user"
"does not map back to the address"
"pam_unix(sshd:auth): authentication failure"
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." 1>&2
exit 1
fi
TMPDIR=$(mktemp -d /tmp/tripleo-docker-patches.XXXXXXXXXX) || exit 1
INSTACK_UNDERCLOUD_PATCHES=(
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." 1>&2
exit 1
fi
TMPDIR=$(mktemp -d /tmp/tripleo-docker-patches.XXXXXXXXXX) || exit 1
INSTACK_UNDERCLOUD_PATCHES=(
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." 1>&2
exit 1
fi
TMPDIR=$(mktemp -d /tmp/tripleo-docker-patches.XXXXXXXXXX) || exit 1
INSTACK_UNDERCLOUD_PATCHES=(