summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes/lib
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2019-07-14 13:07:46 +0200
committersegfault <segfault@riseup.net>2019-07-14 13:07:46 +0200
commit6a198e7a112de0aac139929b5ce216e2f9cebb27 (patch)
tree1cb92536260f4446e86f6ff918b78a3449089ffb /config/chroot_local-includes/lib
parent23863ff20b36b0c37e5c6e589502ff62a84e6c73 (diff)
Remove pre-generated Pidgin accounts (refs: #16744)
Diffstat (limited to 'config/chroot_local-includes/lib')
-rwxr-xr-xconfig/chroot_local-includes/lib/live/config/2010-pidgin63
1 files changed, 0 insertions, 63 deletions
diff --git a/config/chroot_local-includes/lib/live/config/2010-pidgin b/config/chroot_local-includes/lib/live/config/2010-pidgin
deleted file mode 100755
index df5f2f9..0000000
--- a/config/chroot_local-includes/lib/live/config/2010-pidgin
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/sh
-
-# List of at least 2000 possible nicknames
-NICKS_LIST=/usr/share/tails/firstnames.txt
-
-# returns true with probability $1
-prob()
-{
- # sh doesn't have bash's $RANDOM, so we implement it
- RANDOM=$(expr $(od -Anv -N4 -tu4 /dev/urandom) % 32768)
- # we compare with > instead of <= due to mismatch between bash and bc
- # on what values true and false have.
- return $(echo "scale = 10; ${RANDOM}/32767 > ${1}" | bc)
-}
-
-leet_nick()
-{
- # we leave the first letter due to restrictions on nicks in IRC
- first=$(expr substr ${1} 1 1)
- rest=${1#?}
- rest=$(echo "${rest}" | tr 'e' '3' | tr 'i' '1' | tr 'o' '0')
- echo "${first}${rest}"
-}
-
-generate_nick()
-{
- NICK=$(/usr/local/bin/lc.py -g 1 --min 4 --max 10 "${NICKS_LIST}")
-
- if prob 0.90; then
- NICK=$(echo "${NICK}" | tr '[:upper:]' '[:lower:]')
- fi
-
- if prob 0.05; then
- if prob 0.50; then
- NICK="${NICK}_"
- else
- NICK="${NICK}^"
- fi
- fi
-
- if prob 0.05; then
- NICK=$(leet_nick "${NICK}")
- fi
-
- echo ${NICK}
-}
-
-Configure_pidgin ()
-{
-
- echo "- configuring Pidgin"
-
- NICK=$(generate_nick)
-
- for file in accounts.xml blist.xml ; do
- sudo -H -u "${LIVE_USERNAME}" sed -i'' "s,XXX_NICK_XXX,${NICK}," "/home/${LIVE_USERNAME}/.purple/${file}"
- done
-
- # Creating state file
- touch /var/lib/live/config/pidgin
-}
-
-Configure_pidgin