This file contains hidden or 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
| import webcolors | |
| import sys | |
| import urllib.request | |
| import os | |
| # Make use of xkcd 954 color name mappings in one name to rgb file (thank you dudes!) | |
| if not os.path.exists(os.path.join(os.path.realpath(__file__), "rgb.txt")): | |
| urllib.request.urlretrieve("https://xkcd.com/color/rgb.txt", "rgb.txt") | |
| def closest_color(requested_color:str): |
This file contains hidden or 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 | |
| if [ $UID -ne 0 ]; then | |
| echo "root only" | |
| exit 1 | |
| fi | |
| restart=0 | |
| for i in $(grep "Failed password" /var/log/secure | grep -oE '((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])' | uniq) | |
| do | |
| if [ `grep -c " $i\$" /etc/hosts.deny` -eq 0 ]; then |
This file contains hidden or 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
| for o in $(grep -A1 "failed mail authentication attempt for user" /var/log/maillog |grep "authentication fail" | perl -pe 's#.*unknown\[([^\]].*?)\].*#\1#' | grep -E "^[[:digit:]]+" | uniq); do whois $o | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}\/" | grep -v "^%" | awk '{print $2}'; done |