Skip to content

Commit

Permalink
404s fixed; HTTPS upgrades; misc formatting fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kujau <[email protected]>

 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(-)
  • Loading branch information
ckujau committed Feb 7, 2020
1 parent 4f90789 commit ae54827
Show file tree
Hide file tree
Showing 24 changed files with 65 additions and 63 deletions.
11 changes: 8 additions & 3 deletions backup-mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
;;

Expand Down
18 changes: 8 additions & 10 deletions benchmarks/compress-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 2 additions & 1 deletion benchmarks/cryptsetup_ciphertest.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/sh
#
# (c)2013 Christian Kujau <[email protected]>
#
# 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.
Expand Down
1 change: 0 additions & 1 deletion benchmarks/fs-bench.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ NPROC=50
}

conf_iozone() {
# http://iscsi.studiokubota.com/#mozTocId161806
CACHESIZE=256K
FILESIZE=8G
NPROC=1024
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/fs-bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 $
#
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/password-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion benchmarks/ssh-features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/ssh-performance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions benchmarks/vbox-nic-bench.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/sh
#
# (c)2017-2019 Christian Kujau <[email protected]>
# (c)2017 Christian Kujau <[email protected]>
#
# 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
Expand Down
9 changes: 7 additions & 2 deletions checksum_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
;;

Expand Down
20 changes: 6 additions & 14 deletions convert-music.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand All @@ -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/.*=//)
Expand All @@ -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/^.*: //')
Expand Down
2 changes: 1 addition & 1 deletion diff2html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<XX
<html>
Expand Down
2 changes: 1 addition & 1 deletion expect/change-passwords.exp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion funiq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
4 changes: 2 additions & 2 deletions impressum.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
$name<br/>
$city</p>
<p>Die Postaddresse kann via <a href=\"mailto:$mail@$host\">Email</a> erfragt werden oder via <a href=
\"http://www.denic.de/de/hintergrund/whois-service/webwhois.html\">whois</a> fuer die Domain <a href=\"http://$host\">$host</a> abgefragt
\"https://www.denic.de/service/whois-service/\">whois</a> fuer die Domain <a href=\"http://$host\">$host</a> abgefragt
werden.<br /></p>
<p>E-Mail: $mail@$host<br />
WWW: http://$host/<br /></p>
<p>Inhaltlich Verantwortlicher gemaess <a href=\"http://www.gesetze-im-internet.de/tmg/\">Telemediengesetz</a>: $name (Anschrift wie oben)<br /></p>
<p>Inhaltlich Verantwortlicher gemaess <a href=\"https://www.gesetze-im-internet.de/tmg/\">Telemediengesetz</a>: $name (Anschrift wie oben)<br /></p>
<p>Hinweise:</p>
<ol>
<li>Trotz sorgfaeltiger inhaltlicher Kontrolle uebernehme ich keine Haftung fuer die Inhalte externer Links. Fuer den Inhalt der
Expand Down
7 changes: 5 additions & 2 deletions ipsec_iproute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down
2 changes: 1 addition & 1 deletion mozilla/autoconfig.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions munin/plugins/tor_traffic
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# (c)2010 Christian Kujau <[email protected]>
# 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
Expand Down
4 changes: 2 additions & 2 deletions qemu-tap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# (c)2015 Christian Kujau <[email protected]>
#
# 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

Expand Down
4 changes: 2 additions & 2 deletions security_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# (c)2010 Christian Kujau <[email protected]>
#
# 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
Expand Down
2 changes: 1 addition & 1 deletion system-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ternet/flop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ternet/iptables-ternet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions vbox-sysrq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ae54827

Please sign in to comment.