From ae54827fd8f50765d112af3216e1f9d97fdff152 Mon Sep 17 00:00:00 2001
From: Christian Kujau
Date: Thu, 6 Feb 2020 22:53:31 -0800
Subject: [PATCH] 404s fixed; HTTPS upgrades; misc formatting fixes
Signed-off-by: Christian Kujau
backup-mysql.sh | 11 ++++++++---
benchmarks/compress-test.sh | 18 ++++++++----------
benchmarks/cryptsetup_ciphertest.sh | 3 ++-
benchmarks/fs-bench.conf | 1 -
benchmarks/fs-bench.sh | 6 +++---
benchmarks/password-test.sh | 8 ++++----
benchmarks/ssh-features.sh | 1 -
benchmarks/ssh-performance.sh | 4 ++--
benchmarks/vbox-nic-bench.sh | 5 +++--
checksum_file.sh | 9 +++++++--
convert-music.sh | 20 ++++++--------------
diff2html.sh | 2 +-
expect/change-passwords.exp | 2 +-
funiq.sh | 2 +-
impressum.php | 4 ++--
ipsec_iproute.sh | 7 +++++--
mozilla/autoconfig.js | 2 +-
munin/plugins/tor_traffic | 4 ++--
qemu-tap.sh | 4 ++--
security_checks.sh | 4 ++--
system-update.sh | 2 +-
ternet/flop.sh | 2 +-
ternet/iptables-ternet.sh | 2 +-
vbox-sysrq.sh | 5 ++---
24 files changed, 65 insertions(+), 63 deletions(-)
---
backup-mysql.sh | 11 ++++++++---
benchmarks/compress-test.sh | 18 ++++++++----------
benchmarks/cryptsetup_ciphertest.sh | 3 ++-
benchmarks/fs-bench.conf | 1 -
benchmarks/fs-bench.sh | 6 +++---
benchmarks/password-test.sh | 8 ++++----
benchmarks/ssh-features.sh | 1 -
benchmarks/ssh-performance.sh | 4 ++--
benchmarks/vbox-nic-bench.sh | 5 +++--
checksum_file.sh | 9 +++++++--
convert-music.sh | 20 ++++++--------------
diff2html.sh | 2 +-
expect/change-passwords.exp | 2 +-
funiq.sh | 2 +-
impressum.php | 4 ++--
ipsec_iproute.sh | 7 +++++--
mozilla/autoconfig.js | 2 +-
munin/plugins/tor_traffic | 4 ++--
qemu-tap.sh | 4 ++--
security_checks.sh | 4 ++--
system-update.sh | 2 +-
ternet/flop.sh | 2 +-
ternet/iptables-ternet.sh | 2 +-
vbox-sysrq.sh | 5 ++---
24 files changed, 65 insertions(+), 63 deletions(-)
diff --git a/backup-mysql.sh b/backup-mysql.sh
index ab68401..b12f4a6 100755
--- a/backup-mysql.sh
+++ b/backup-mysql.sh
@@ -64,9 +64,14 @@ for db in `mysql --batch --skip-column-names -e 'show databases' | sort`; do
case "$db" in
performance_schema|information_schema)
# Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES
- # http://bugs.mysql.com/bug.php?id=21527 (closed)
- # http://bugs.mysql.com/bug.php?id=33762 (closed)
- # http://bugs.mysql.com/bug.php?id=49633
+ # > mysqldump incorrectly tries to LOCK TABLES on the information_schema database.
+ # > https://bugs.mysql.com/bug.php?id=21527 (closed)
+ #
+ # > mysqldump can not dump INFORMATION_SCHEMA
+ # > https://bugs.mysql.com/bug.php?id=33762 (closed)
+ #
+ # > mysqldump: problems dumping INFORMATION_SCHEMA
+ # > https://bugs.mysql.com/bug.php?id=49633 (verified)
OPTIONS="--extended-insert --force --flush-logs --flush-privileges --skip-lock-tables --hex-blob --routines --triggers"
;;
diff --git a/benchmarks/compress-test.sh b/benchmarks/compress-test.sh
index d641814..2aa571e 100755
--- a/benchmarks/compress-test.sh
+++ b/benchmarks/compress-test.sh
@@ -4,19 +4,17 @@
#
# Compress a file with different programs and see how long it took to do this.
#
-# Links:
+# > Squash Compression Benchmark
+# > https://quixdb.github.io/squash-benchmark/
#
-# Squash Compression Benchmark
-# https://quixdb.github.io/squash-benchmark/
+# > Large Text Compression Benchmark
+# > http://mattmahoney.net/dc/text.html
#
-# Large Text Compression Benchmark
-# http://mattmahoney.net/dc/text.html
+# > Lzturbo library: world's fastest compression library
+# > https://sites.google.com/site/powturbo/home/benchmark
#
-# Lzturbo library: world's fastest compression library
-# https://sites.google.com/site/powturbo/home/benchmark
-#
-# Packbench
-# https://martin-steigerwald.de/computer/programme/packbench/
+# > Packbench
+# > https://martin-steigerwald.de/computer/programme/packbench/
#
PATH=/usr/local/bin:/usr/bin:/bin
PROGRAMS=${PROGRAMS:-gzip pigz bzip2 pbzip2 lbzip2 xz pxz lz4 lzma lzip brotli zstd pzstd pixz}
diff --git a/benchmarks/cryptsetup_ciphertest.sh b/benchmarks/cryptsetup_ciphertest.sh
index 83d4178..64fd3f4 100755
--- a/benchmarks/cryptsetup_ciphertest.sh
+++ b/benchmarks/cryptsetup_ciphertest.sh
@@ -1,12 +1,13 @@
#!/bin/sh
#
# (c)2013 Christian Kujau
+#
# Create dm-crypt devices with different combinations of ciphers, modes, hash
# alorithms and key sizes.
#
# Preferably cryptsetup(8) would be able to parse /proc/crypto and generate a
# list of possible combinations, but this has not been implemented.
-# See https://code.google.com/p/cryptsetup/issues/detail?id=20 for that. Instead,
+# See https://gitlab.com/cryptsetup/cryptsetup/issues/20 for that. Instead,
# we iterate through a list of more or less "common" choices and print out all
# valid (and invalid) combinations. The results can later be used by
# cryptsetup_benchmark.sh - so we don't benchmark invalid combinations.
diff --git a/benchmarks/fs-bench.conf b/benchmarks/fs-bench.conf
index 253bae7..07594d5 100644
--- a/benchmarks/fs-bench.conf
+++ b/benchmarks/fs-bench.conf
@@ -50,7 +50,6 @@ NPROC=50
}
conf_iozone() {
-# http://iscsi.studiokubota.com/#mozTocId161806
CACHESIZE=256K
FILESIZE=8G
NPROC=1024
diff --git a/benchmarks/fs-bench.sh b/benchmarks/fs-bench.sh
index 7e55095..0b9dd2c 100755
--- a/benchmarks/fs-bench.sh
+++ b/benchmarks/fs-bench.sh
@@ -13,11 +13,11 @@
# TODO:
# - different mount options for each filesystems
# - different benchmark options
-# - integrate fio? (http://git.kernel.dk/?p=fio.git)
+# - integrate fio? (https://github.com/axboe/fio)
#
# v0.1 - initial version
# v0.2 - disabled 2 filesystems
-# ufs - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526586
+# ufs - https://bugs.debian.org/526586 ("mkfs.ufs: could not find special device")
# nilfs2 - filesystem fills up until ENOSPC
# v0.3 - run tiobench with only 1 thread, otherwise we get:
# Illegal division by zero at /usr/bin/tiobench line 163
@@ -229,7 +229,7 @@ $DEBUG egrep -hv '^format' $LOG/raw/bonnie-*.csv | bon_csv2html > $LOG/bonnie.ht
########################################################
run_stress() {
#
-# Based on http://oss.oracle.com/~mason/stress.sh
+# Based on https://oss.oracle.com/~mason/stress.sh
# Copyright (C) 1999 Bibliotech Ltd., 631-633 Fulham Rd., London SW6 5UQ.
# $Id: stress.sh,v 1.2 1999/02/10 10:58:04 rich Exp $
#
diff --git a/benchmarks/password-test.sh b/benchmarks/password-test.sh
index 914f446..b736898 100755
--- a/benchmarks/password-test.sh
+++ b/benchmarks/password-test.sh
@@ -77,7 +77,7 @@ apg -a 1 -m $LEN -x $LEN -n $NUM
r_gpw() {
# gpw: Password Generator
-# http://www.multicians.org/thvv/tvvtools.html#gpw
+# https://www.multicians.org/thvv/tvvtools.html#gpw
# USAGE: gpw [npasswds] [pwlength<100]
gpw $NUM $LEN
}
@@ -86,11 +86,11 @@ r_makepasswd() {
# There are actually two versions available:
#
# The Debian version of makepasswd resides in the "whois" package:
-# > https://bugs.debian.org/116260
# > whois: Why does it include mkpasswd?
+# > https://bugs.debian.org/116260
#
-# The Fedora people have their own version:
-# http://people.defora.org/~khorben/projects/makepasswd/
+# > Fedora / mkpasswd
+# > https://koji.fedoraproject.org/koji/packageinfo?packageID=17537
#
# makepasswd --chars=$LEN --count=$NUM # Debian
makepasswd -l $LEN -n $NUM # Fedora
diff --git a/benchmarks/ssh-features.sh b/benchmarks/ssh-features.sh
index fbfc51e..3164a60 100755
--- a/benchmarks/ssh-features.sh
+++ b/benchmarks/ssh-features.sh
@@ -7,7 +7,6 @@
#
# Note: Starting with OpenSSH 6.3, we can use "ssh -Q" to enumerate all known
# ciphers, MAC and key exchange algorithms, so this script is kinda obsolete now.
-# http://www.openssh.com/txt/release-6.3
#
# Run with:
# ./ssh-features.sh dummy@host0 2>&1 | tee ssh-eval.log
diff --git a/benchmarks/ssh-performance.sh b/benchmarks/ssh-performance.sh
index f43e158..7f60de6 100755
--- a/benchmarks/ssh-performance.sh
+++ b/benchmarks/ssh-performance.sh
@@ -4,7 +4,7 @@
#
# Poor wo/man's SSH benchmark. Inspired by:
# > OpenSSH default/preferred ciphers, hash, etc for SSH2
-# > http://security.stackexchange.com/questions/25662/openssh-default-preferred-ciphers-hash-etc-for-ssh2
+# > https://security.stackexchange.com/a/26074
#
# Compare with:
# > OpenBSD: cipher-speed.sh
@@ -29,7 +29,7 @@ TEMP=$(mktemp)
trap 'rm -f "$TEMP"; exit' EXIT INT TERM HUP
# Enumerate all known ciphers, MAC and key exchange algorithms.
-# Available since OpenSSH 6.3 / http://www.openssh.com/txt/release-6.3
+# Available since OpenSSH 6.3
#
# === Distribution support ================
# | Debian/wheezy-backports || OpenSSH 6.6
diff --git a/benchmarks/vbox-nic-bench.sh b/benchmarks/vbox-nic-bench.sh
index 9b3ab2c..a49a286 100755
--- a/benchmarks/vbox-nic-bench.sh
+++ b/benchmarks/vbox-nic-bench.sh
@@ -1,9 +1,10 @@
#!/bin/sh
#
-# (c)2017-2019 Christian Kujau
+# (c)2017 Christian Kujau
#
-# https://www.virtualbox.org/manual/ch06.html#nichardware
# 6.1. Virtual networking hardware
+# https://www.virtualbox.org/manual/ch06.html#nichardware
+#
# > vboxmanage --help | grep -A2 nictype
# --nictype1 Am79C970A - pcnet II
# Am79C973 - pcnet III - default
diff --git a/checksum_file.sh b/checksum_file.sh
index be725b6..8a02918 100755
--- a/checksum_file.sh
+++ b/checksum_file.sh
@@ -145,8 +145,13 @@ case ${OS} in
# NOTE: If the designated EA is not set, getfattr may not return a non-zero
# exit code. This has been fixed upstream but may not have been picked up
# by your distribution.
- # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520659
- # https://bugzilla.redhat.com/show_bug.cgi?id=660619
+ #
+ # > getfattr should indicate missing xattrs via exit value
+ # > https://bugs.debian.org/520659
+ #
+ # > getfattr does not return failure when designated attribute does not exist
+ # > https://bugzilla.redhat.com/show_bug.cgi?id=660619
+ #
getfattr --only-values --name user.checksum.${DIGEST} -- "$1" 2>/dev/null | awk '/[a-z0-9]/ {print $1}'
;;
diff --git a/convert-music.sh b/convert-music.sh
index bad27b9..8bc2c73 100755
--- a/convert-music.sh
+++ b/convert-music.sh
@@ -6,19 +6,11 @@
#
# TODO: Add more conversions, much more :-)
#
-# Linkdump:
+# > Convert flac to (almost) anything
+# > https://forums.gentoo.org/viewtopic-t-554188.html
#
-# Convert flac to (almost) anything
-# https://forums.gentoo.org/viewtopic-t-554188.html
-#
-# .ogg to .mp3
-# https://forums.gentoo.org/viewtopic-t-463068-highlight-.html
-#
-# Howto:convert aac/mp4 to wav/mp3/ogg on Linux
-# http://gimpel.gi.funpic.de/wiki/index.php/Howto:convert_aac/mp4_to_wav/mp3/ogg_on_Linux#ogg2mp3
-#
-# Convert Flac to Mp3
-# https://wiki.archlinux.org/index.php/Convert_Flac_to_Mp3
+# > .ogg to .mp3
+# > https://forums.gentoo.org/viewtopic-t-463068.html
#
if [ ! $# -eq 2 ] || [ ! -f "$2" ]; then
echo "Usage: `basename $0` [conversion] [file]"
@@ -43,7 +35,8 @@ LAMEARGS="-m j -q 5 --vbr-new -V 4 -s 44.1 --add-id3v2 --ignore-tag-errors"
case $CONVERSION in
flac2mp3)
- # https://wiki.archlinux.org/index.php/Convert_Flac_to_Mp3
+ # Convert FLAC to MP3
+ # https://wiki.archlinux.org/index.php/Convert_FLAC_to_MP3
# Software needed: flac, lame
OUTPUT=${FILE%.flac}.mp3
TRACK=$(metaflac --show-tag=TRACKNUMBER "$FILE" | sed s/.*=//)
@@ -68,7 +61,6 @@ case $CONVERSION in
;;
m4a2mp3)
- # http://gimpel.gi.funpic.de/wiki/index.php/Howto:convert_aac/mp4_to_wav/mp3/ogg_on_Linux
# Software needed: faad, lame
OUTPUT=${FILE%.m4a}.mp3
TRACK=$(faad --info "$FILE" 2>&1 | grep ^track | sed 's/^.*: //')
diff --git a/diff2html.sh b/diff2html.sh
index 715d6ef..a15f671 100755
--- a/diff2html.sh
+++ b/diff2html.sh
@@ -2,7 +2,7 @@
#
# Convert diff output to colorized HTML.
# (C) Mitch Frazier, 2008-08-27
-# http://www.linuxjournal.com/content/convert-diff-output-colorized-html
+# https://web.archive.org/web/20190828131321/https://www.linuxjournal.com/content/convert-diff-output-colorized-html
#
cat <
diff --git a/expect/change-passwords.exp b/expect/change-passwords.exp
index 5be952f..728ae2c 100755
--- a/expect/change-passwords.exp
+++ b/expect/change-passwords.exp
@@ -6,7 +6,7 @@
# Copyright (c) 2006 nixCraft project
# This script is licensed under GNU GPL version 2.0 or above
# This script is part of nixCraft shell script collection (NSSC)
-# Visit http://bash.cyberciti.biz/ for more information.
+# Visit https://bash.cyberciti.biz/ for more information.
# --------------------------------------------------------------
#
# (c)2011 Christian Kujau
diff --git a/funiq.sh b/funiq.sh
index d46714f..9e7a6fa 100755
--- a/funiq.sh
+++ b/funiq.sh
@@ -2,7 +2,7 @@
#
# (C) David Lambert, 2008-10-01
# Fuzzy uniq (or Parsing Connect:Direct stats part 3)
-# http://cdunix.blogspot.com/2008/10/fuzzy-uniq-or-parsing-connectdirect.html
+# https://cdunix.blogspot.com/2008/10/fuzzy-uniq-or-parsing-connectdirect.html
#
# Get percentage of similarity from command line option, or 85 for default
#
diff --git a/impressum.php b/impressum.php
index 2528017..e799951 100644
--- a/impressum.php
+++ b/impressum.php
@@ -36,11 +36,11 @@
$name
$city
Die Postaddresse kann via Email erfragt werden oder via whois fuer die Domain $host abgefragt
+\"https://www.denic.de/service/whois-service/\">whois fuer die Domain $host abgefragt
werden.
E-Mail: $mail@$host
WWW: http://$host/
-Inhaltlich Verantwortlicher gemaess Telemediengesetz: $name (Anschrift wie oben)
+Inhaltlich Verantwortlicher gemaess Telemediengesetz: $name (Anschrift wie oben)
Hinweise:
- Trotz sorgfaeltiger inhaltlicher Kontrolle uebernehme ich keine Haftung fuer die Inhalte externer Links. Fuer den Inhalt der
diff --git a/ipsec_iproute.sh b/ipsec_iproute.sh
index 05b6d8c..cce2723 100755
--- a/ipsec_iproute.sh
+++ b/ipsec_iproute.sh
@@ -4,8 +4,11 @@
# Start/stop an IPsec tunnel with iproute2
#
# Inspired by:
-# https://gist.github.com/vishvananda/7094676
-# https://backreference.org/2014/11/12/on-the-fly-ipsec-vpn-with-iproute2/
+# > vishvananda/tunnel.sh
+# > https://gist.github.com/vishvananda/7094676
+#
+# > “On the fly” IPsec VPN with iproute2
+# > https://backreference.org/2014/11/12/on-the-fly-ipsec-vpn-with-iproute2/
#
if [ $# -ne 7 ] || [ ! -f "$HOME/.xfrm-keys" ]; then
echo "Usage: $(basename $0) [SRC LOCAL DEV] [DST REMOTE DEV] [start|stop|status]"
diff --git a/mozilla/autoconfig.js b/mozilla/autoconfig.js
index 93975b8..dcc6823 100644
--- a/mozilla/autoconfig.js
+++ b/mozilla/autoconfig.js
@@ -1,7 +1,7 @@
/*
* autoconfig.js
* http://kb.mozillazine.org/Locking_preferences
- * https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment
+ * https://developer.mozilla.org/docs/Mozilla/Firefox/Enterprise_deployment
*
* Note: the file specified here will be expected to be located in the
* installation directory, e.g. /usr/lib/firefox. Instead of putting our
diff --git a/munin/plugins/tor_traffic b/munin/plugins/tor_traffic
index d19927d..a4491c7 100755
--- a/munin/plugins/tor_traffic
+++ b/munin/plugins/tor_traffic
@@ -3,8 +3,8 @@
# (c)2010 Christian Kujau
# Get accounting information from a running Tor server.
#
-# More info:
-# https://gitweb.torproject.org/torspec.git/blob/HEAD:/control-spec.txt
+# TC: A Tor control protocol
+# https://gitweb.torproject.org/torspec.git/tree/control-spec.txt
#
[ -z "$conf" ] && conf=/etc/torrc
[ -z "$port" ] && port=9051
diff --git a/qemu-tap.sh b/qemu-tap.sh
index 7e23032..23af0c8 100755
--- a/qemu-tap.sh
+++ b/qemu-tap.sh
@@ -3,8 +3,8 @@
# (c)2015 Christian Kujau
#
# Based on:
-# https://superuser.com/questions/596095/how-do-i-bridge-a-connection-from-wi-fi-to-tap-on-mac-os-x-for-the-emulator-qe
-# http://en.blog.guylhem.net/post/88201449689/running-qemu-with-tap0-and-nat-under-osx-10-9-maverick
+# > How do I bridge a connection from Wi-Fi to TAP on Mac OS X? (for the emulator QEMU)
+# > https://superuser.com/a/766251
#
INTERFACE=en1
diff --git a/security_checks.sh b/security_checks.sh
index 84c0536..090186d 100755
--- a/security_checks.sh
+++ b/security_checks.sh
@@ -3,8 +3,8 @@
# (c)2010 Christian Kujau
#
# Execute a few security checks, keep state across runs.
-# rkhunter: http://www.rootkit.nl/projects/rootkit_hunter.html
-# lynis: http://www.rootkit.nl/projects/lynis.html
+# rkhunter: http://rkhunter.sourceforge.net/
+# lynis: https://cisofy.com/lynis/
# chkrootkit: http://www.chkrootkit.org/
#
STATE=/var/run/sec.state
diff --git a/system-update.sh b/system-update.sh
index 43e45a3..8d7f361 100755
--- a/system-update.sh
+++ b/system-update.sh
@@ -5,7 +5,7 @@
# Automatic upgrades for various distributions.
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/local/bin:/opt/csw/bin
- URL=https://raw.github.com/ckujau/scripts/master/system-update.sh
+ URL=https://raw.githubusercontent.com/ckujau/scripts/master/system-update.sh
LOG=/var/log/system-update.log
umask 0022
diff --git a/ternet/flop.sh b/ternet/flop.sh
index cecd13d..ab384d3 100755
--- a/ternet/flop.sh
+++ b/ternet/flop.sh
@@ -2,7 +2,7 @@
#
# (C) Mule, 2009-08-07
# The Lolcats, they are everywhere!
-# http://www.breakingsystemsforfunandprofit.com/the-lolcats-they-are-everywhere/
+# https://web.archive.org/web/20170702162404/http://www.breakingsystemsforfunandprofit.com/the-lolcats-they-are-everywhere/
#
DIR=/var/www/ternet
while read URL; do
diff --git a/ternet/iptables-ternet.sh b/ternet/iptables-ternet.sh
index 6eac4c2..2298f23 100755
--- a/ternet/iptables-ternet.sh
+++ b/ternet/iptables-ternet.sh
@@ -2,7 +2,7 @@
#
# (C) MMCM
# External proxy for transparent proxying
-# https://forum.openwrt.org/viewtopic.php?id=18582
+# https://forum.archive.openwrt.org/viewtopic.php?id=18582
#
SRC=10.0.0.0/24
IFACE=br-lan
diff --git a/vbox-sysrq.sh b/vbox-sysrq.sh
index 3cffef2..5dc7892 100644
--- a/vbox-sysrq.sh
+++ b/vbox-sysrq.sh
@@ -20,10 +20,9 @@
# https://forums.virtualbox.org/viewtopic.php?f=6&t=10400#p207674
#
# Use Magic Sysrq-key in guest
-# http://www.halfdog.net/Misc/TipsAndTricks/VirtualBox.html#MagicSysrq
+# https://www.halfdog.net/Misc/TipsAndTricks/VirtualBox.html#MagicSysrq
#
# Switching Linux terminals in VirtualBox using VBoxManage
-# http://blog.frameos.org/2011/06/08/changing-linux-terminals-in-virtualbox-using-vboxmanage/
# https://web.archive.org/web/20130102094426/http://blog.frameos.org/2011/06/08/changing-linux-terminals-in-virtualbox-using-vboxmanage
#
if [ ! $# -eq 2 ]; then
@@ -35,7 +34,7 @@ else
SYSRQ="$2"
fi
-# From http://www.mjmwired.net/kernel/Documentation/sysrq.txt
+# https://www.kernel.org/doc/Documentation/admin-guide/sysrq.rst
PRESS=`echo "
b|30 # reBoot
c|2E # Crash