All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated

dominic / ubl-openbsd.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 #!/bin/sh
2 #
3 # Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
4 # export the blacklist table from pf (pfctl -t blacklist)
5 # to the blocked.txt file on my http webroot
6
7 if [[ $USER == "root" ]]; then
8 echo >&2 "user must not be root! exiting."
9 exit 1
10 fi

dominic / ubl-arch.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 #!/bin/sh
2 # 2024-05-26
3 # lastmod: 2024-10-05
4 # Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
5
6 BFILE=/srv/http/blocked.txt
7 IPFILE=~/ips
8
9 if [[ $USER == "root" ]]; then
10 echo >&2 "User must not be root! Exiting"

dominic / update-webfai.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 #!/usr/local/bin/zsh
2 #
3 # Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
4
5 DATE=$(date +%Y%d%m)
6 FILENAME=$(ls -1 *.iso)
7 BASENAME=$(basename ${FILENAME} .iso)
8 BACKUPFILE=${BASENAME}.backup-$DATE.iso
9
10 # backup old image

dominic / xbl-freebsd.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 #! /bin/sh
2 # FreeBSD version
3 #
4 # Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
5
6 print_usage () {
7 echo >&2 "usage: $(basename ${0}) [0..100]"
8 exit 1
9 }

dominic / xbl-openbsd.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 #!/bin/sh
2 # OpenBSD version
3 # integer scheck inspired from: https://stackoverflow.com/a/16444570
4 #
5 # Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
6
7 print_usage () {
8 echo >&2 "usage: $(basename ${0}) [0..100]"
9 exit 1
10 }

dominic / xbl-arch

0 likes
0 forks
1 files
Last active 10 months ago
1 #!/bin/sh
2 # Archlinux version
3 # integer scheck inspired from: https://stackoverflow.com/a/16444570
4 #
5 # Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
6
7 print_usage () {
8 echo >&2 "usage: $(basename ${0}) [0..100]"
9 exit 1
10 }

dominic / toggle-touchpad.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 #!/bin/sh
2 #
3 # Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
4 #
5 # Toggles (enables/disables) the Touchpad on my X1 Carbon running FreeBSD 13.2
6 # Created: 2023-06-23 11:15
7
8 (xinput list SYNA8004:00\ 06CB:CD8B\ TouchPad | grep disabled) > /dev/null
9
10 case $? in

dominic / get-suspic-ips.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 #!/bin/sh
2
3 GREP=/usr/bin/grep
4
5 $GREP -Eh 'pma|admin|sql|w00t|CONNECT|wp-admin|wp-login|wordpress|cgi-bin' /var/log/httpd/access_log | mutt -s "Suspicious Webserver URLs (celeste/new)" -- recipient@domain
6
7 $GREP -h '404' /var/log/httpd/access_log | grep ".zip" | mutt -s "Suspicious Webserver URLs (celeste/new) zip files" -- recipient@domain

dominic / send-suspicips.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 #!/bin/sh
2 #
3 # Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
4
5 suspicfile=~/suspic
6 tmpfile=/tmp/ips
7
8 clean_up() {
9 echo -n "Removing tmp file..."
10 rm -f $tmpfile

dominic / savemail.sh

0 likes
0 forks
1 files
Last active 1 year ago
1 #!/bin/sh
2 #
3 # Saves an incoming email as plain text file (or .eml)
4 # somewhere in the webservers directories
5 # Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
6 # License: MIT
7
8 #umask 133
9
10 date=`date +%Y%m%d-%H%M%S`
Newer Older

Powered by Opengist ⋅ Load: 86ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文