Skip to content

Instantly share code, notes, and snippets.

## insert-spammers-into-ip6tables.sh v0.1
## Dorian Harmans <contact@dorianharmans.nl>
##
#!/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"
## insert-spammers-into-iptables.sh v0.1
## Dorian Harmans <contact@dorianharmans.nl>
##
#!/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"
## make-spammers-list-ipv6.sh v0.1
## Dorian Harmans <contact@dorianharmans.nl>
##
#!/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"
## make-spammers-list.sh v0.1
## Dorian Harmans <contact@dorianharmans.nl>
##
#!/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
" set rtp+=/usr/lib/python2.7/site-packages/powerline/bindings/vim/
set guifont=Noto\ Mono\ for\ Powerline\ 11
set guioptions-=b
set guioptions-=l
set guioptions-=r
set hidden
set laststatus=2
set showtabline=2
set ssop-=folds " do not store folds
set ssop-=options " do not store global and local values in a session
defscrollback 10000
startup_message off
#hardstatus on
altscreen on
mousetrack on
term screen-256color
bind ',' prev
bind '.' next
#hardstatus alwayslastline
#hardstatus string '%{= kG}[ %{R}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{R} %d-%m-%Y %{W}@ %{B}%0c:%s %{g}]'
# dot.tmux.conf
set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
set-option -g set-titles on
set-option -g set-titles-string "#S:#h/#I:#W"
set -g base-index 1
set -g pane-base-index 1
set -g status "on"
set -g status-attr "none"
20 4 * * * /usr/bin/certbot renew --quiet --pre-hook "/bin/systemctl stop nginx" --post-hook "/bin/systemctl start nginx; /bin/systemctl reload postfix; /bin/systemctl reload dovecot; /etc/letsencrypt/scripts/copy-letsencrypt-cert-to-inspircd.sh && /etc/letsencrypt/scripts/copy-letsencrypt-cert-to-znc.sh && /bin/systemctl reload inspircd.service"
conky.config = {
background = true,
use_xft = true,
font = 'xos4 Terminus:size=8',
xftalpha = 0.1,
--Update Interval
update_interval = 1,
total_run_times = 0,
own_window = true,
own_window_type = 'desktop',
@woohooyeah
woohooyeah / GlowingBear.css
Last active April 2, 2017 12:14
GlowingBear.css
/* Use with preferred font: Noto Mono, Consolas, Monaco, Ubuntu Mono, monospace (size 13px) */
#topbar {
font-family: "Noto Mono";
font-size: 11px;
}
@media (min-width: 968px) {
.nav-pills {
font-size: 14px;