Compare commits

...

6 Commits

@ -0,0 +1,6 @@
#!/bin/bash
grep 'sshd' /var/log/auth.log |
grep -P '(not allowed because not listed in|Invalid user|Did not receive identification string from|Unable to negotiate with|Bad protocol version identification|error: maximum authentication attempts exceeded for)' |
grep -o -P '(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)' |
sort -u

@ -6,15 +6,25 @@ if [ $# -eq 1 ]; then
cd "$1";
fi
user=$(stat -c '%U' .);
r() {
sudo -u "$user" $@;
}
git() {
r git $@;
}
PREFIX=release;
CONF_SCRIPT="configure.sh";
git pull --tags > /dev/null;
git fetch --tags > /dev/null;
TAG=$(git tag --list | grep "^$PREFIX-" | sort -r | head -n 1);
if git verify-tag --raw "$TAG" 2>&1 | grep "TRUST_ULTIMATE" > /dev/null; then
git checkout -q "$TAG";
if [ -f "$CONF_SCRIPT" ]; then
./$CONF_SCRIPT;
if [ -x "$CONF_SCRIPT" ]; then
r ./$CONF_SCRIPT;
fi
else
echo "Invalid or missing signature for $TAG" >&2;

Loading…
Cancel
Save