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 | |
| mkdir -p Amsterdam | |
| cd Amsterdam | |
| rm -f {Activiteiten,EtenDrinken,Evenementen,Festivals,MuseaGalleries,Shoppen,Tentoonstellingen,Theater,UitInAmsterdam}.json | |
| wget http://open.data.amsterdam.nl/Activiteiten.json | |
| wget http://open.data.amsterdam.nl/EtenDrinken.json | |
| wget http://open.data.amsterdam.nl/Evenementen.json | |
| wget http://open.data.amsterdam.nl/Festivals.json | |
| wget http://open.data.amsterdam.nl/MuseaGalleries.json | |
| wget http://open.data.amsterdam.nl/Shoppen.json |
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
| */10 * * * * ( /root/make-spammers-list.sh >/dev/null 2>&1 ) && /root/insert-spammers-into-iptables.sh | |
| */10 * * * * ( /root/make-spammers-list-ipv6.sh >/dev/null 2>&1 ) && /root/insert-spammers-into-ip6tables.sh |
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
| ## Script to copy LetsEncrypt certificates to InspIRCd | |
| ## Run this after certbot renew ! | |
| ## Dorian Harmans <[email protected]> | |
| ## --------------------------------------------------- | |
| #!/bin/bash | |
| LETSENCRYPTDIR="/etc/letsencrypt/live" | |
| IRCSERVERNAME="irc.domain.tld" |
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
| ## Script to copy LetsEncrypt certificates to ZNC | |
| ## Run this after certbot renew ! | |
| ## Dorian Harmans <[email protected]> | |
| ## --------------------------------------------------- | |
| #!/bin/bash | |
| LETSENCRYPTDIR="/etc/letsencrypt/live" | |
| ZNCSERVERNAME="znc.domain.tld" |
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
| ## insert-spammers-into-ip6tables.sh v0.1 | |
| ## Dorian Harmans <[email protected]> | |
| ## | |
| #!/bin/bash | |
| if [ -e /root/spammers-ipv6.txt ]; then | |
| /sbin/ip6tables-save > /root/ip6tables.rules && cp /root/ip6tables.rules /root/ip6tables.rules-old | |
| else | |
| echo -e "Failed!\nReason: /root/spammers.txt not found" |
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
| ## insert-spammers-into-iptables.sh v0.1 | |
| ## Dorian Harmans <[email protected]> | |
| ## | |
| #!/bin/bash | |
| if [ -e /root/spammers.txt ]; then | |
| /sbin/iptables-save > /root/iptables.rules && cp /root/iptables.rules /root/iptables.rules-old | |
| else | |
| echo -e "Failed!\nReason: /root/spammers.txt not found" |
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
| ## make-spammers-list-ipv6.sh v0.1 | |
| ## Dorian Harmans <[email protected]> | |
| ## | |
| #!/bin/bash | |
| if [ -e /var/log/mail.log ]; then | |
| ( cat /var/log/mail.log | grep "helo=1 auth=0/1 quit=1 commands=2/3" | egrep -o '(([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]))' | sort | uniq ) > /root/spammers-new-ipv6.txt | |
| else | |
| echo -e "Failed!\nReason: /var/log/mail.log not found" |
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
| ## make-spammers-list.sh v0.1 | |
| ## Dorian Harmans <[email protected]> | |
| ## | |
| #!/bin/bash | |
| if [ -e /var/log/mail.log ]; then | |
| ( cat /var/log/mail.log | grep "helo=1 auth=0/1 quit=1 commands=2/3" | \ | |
| egrep -o '([0-9]{1,3}\.){3}[0-9]{1,3}' | sort | uniq ) \ | |
| > /root/spammers-new.txt |
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
| # | |
| # ~/.bashrc | |
| # | |
| # If not running interactively, don't do anything | |
| [[ $- != *i* ]] && return | |
| alias ls='ls --color=auto' | |
| #PS1='[\u@\h \W]\$ ' |
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
| # dot.zshrc | |
| source "$HOME/.profile" | |
| source /etc/profile.d/vte.sh | |
| autoload -Uz promptinit | |
| autoload -Uz add-zsh-hook | |
| promptinit | |
| prompt fire red white blue black green yellow |
NewerOlder