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/sh | |
# | |
# This script is used on a QNAP TS-269 PRO. https://www.en0ch.se/qnap-and-rsync/ | |
# | |
# You have to change: | |
# 1. $SHAREUSR | |
# 2. $EXCLUDES (if you want o change the name of the file servername.excludes) | |
# 3. $SOURCE & $DESTINATION | |
# 4. user@yourserver.se for the mysqldump | |
# 5. --password=SUPERSECRET |
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 | |
# | |
## Tech and Me ## - 2015-2016, https://www.techandme.se/ | |
# | |
# Tested on Ubuntu Server 14.04. | |
# | |
# Must be root | |
[[ `id -u` -eq 0 ]] || { echo "Must be root to run script, in Ubuntu type: sudo -i"; exit 1; } |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1.0.7 (GNU/Linux) | |
mQGiBDx9wR0RBACR3xGPTkG5Staj7EVeiVJDrYXIPF28MGCrOEGw04tQmQTALz0E | |
YEcyfvui7KScrpHmZpy70PwgwxUDPUMik7vvRiUa9RRbJsDYyom06NGk+Z4dURhn | |
DeNRhcBrNBfyMvUY7HSJ2JP9jhQDWb8Lo1i231tvlnY0tNudVsP484ax6wCgrBwW | |
myad6TLYaETj0+AxGJxYgikD/iERqNF60x+WyfEH/SIOuKGlV/QoxmqOePn2gj9V | |
DWiOOAZ9DDWD6DpRNK/UVZRD1MK37HU1ePv7i92DTL9yIbyJwFcZNkEyMU3t+GBj | |
zf4YvaQnvtA09EdQNsC1GXxNXqYkVmTE1dHH83UK+chaXRoDQ6O9KD9SFE2vsj1d | |
z9VPBACPgmuVcUKXag6ZBY+SBColQzwyZfXtTOCnBh0HP4HOjU4G6CRTcAgLQrdM |
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 | |
TODAY=`date +"%Y%m%d"` | |
OLD=`date -d "1 days ago" +"%Y%m%d"` | |
OLD2=`date -d "10 days ago" +"%Y%m%d"` | |
USER=enoch | |
UPLOAD_DIR="/var/www/owncloud/data/$USER/files/Projekt/GITHUB_MAIL" | |
# Clone Mail master | |
git clone https://github.com/owncloud/mail.git |
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 | |
# | |
# Tech and Me 2015 - https://www.en0ch.se | |
visitor="/var/log/nginx/access.log" | |
lynx -source http://www.reportsfromearth.com/1140/names-best-known-bots-spiders-crawlers-visiting-website-2014/|grep "<td>"|grep -vE '("<td>"|><)'|sed 's/<td>//g'|sed 's|</td>||g'|sort|uniq|awk 'length >= 4'|grep -ivE '(:|gif|wget|xget)'>.rr_tmp | |
bnames=$(wc -l .rr_tmp|awk '{print $1}');echo "found ${bnames} known crawlers" | |
grep -ivf .rr_tmp ${visitor}>.rr1_tmp | |
rnames=$(wc -l .rr1_tmp|awk '{print $1}');echo "found ${rnames} matching log entries" |
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 | |
# | |
# Tech and Me 2015 - https://www.en0ch.se | |
# | |
# This requires PHP 5.6 | |
# Must be root | |
[[ `id -u` -eq 0 ]] || { echo "Must be root to run script, in Ubuntu type: sudo -i"; exit 1; } | |
# Print current version |
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 | |
# | |
# Tech and Me 2015 - https://www.en0ch.se | |
# | |
# This requires PHP 5.5 | |
# Must be root | |
[[ `id -u` -eq 0 ]] || { echo "Must be root to run script, in Ubuntu type: sudo -i"; exit 1; } | |
# Print current version |
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
Debugging bruteforce attack on en0ch.se |
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 | |
# make sure to run this with /bin/bash, NOT /bin/sh | |
echo | |
echo This script will help you setup ssh public key authentication. | |
host=dummy |
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 | |
aptitude -y install expect | |
// Not required in actual script | |
MYSQL_ROOT_PASSWORD=abcd1234 | |
SECURE_MYSQL=$(expect -c " | |
set timeout 10 |
OlderNewer