Posts Tagged ‘Linux’

sudo apt-key adv --keyserver hkp:// --recv ED75B5A4483DA07C
sudo apt-key adv --keyserver hkp:// --recv 9A2FD067A2E3EF7B
sudo apt-key adv --keyserver hkp:// --recv 2EA8F35793D8809A
sudo apt-key adv --keyserver hkp:// --recv 9D6D8F6BC857C906
sudo apt-key adv --keyserver hkp:// --recv 8B48AD6246925553
sudo apt-key adv --keyserver hkp:// --recv 7638D0442B90D010
sudo apt update
sudo apt install git libncurses5-dev libtinfo-dev libreadline-dev pkg-config libgtk2.0-dev
sudo rm -rf youtube-viewer
git clone
cd youtube-viewer
sudo cpan install CPAN ExtUtils::PkgConfig Module::Build inc::latest PAR::Dist Term::ReadLine::Gnu::XS Unicode::GCString LWP::Protocol::https Data::Dump JSON Gtk2 File::ShareDir
perl Build.PL --gtk
sudo ./Build installdeps
sudo ./Build install
# for best playback performance, choose mplayer as video player backend for gtk-youtube-viewer program
# Procedure to copy mp3 files from Youtube playlist to Android smartphone
# Prerequisites: Ubuntu 17.10, bash shell, mp3gain, parallel (to use multi-core processors)
# Prerequisites: Google Chrome Web browser in Ubuntu, AirDroid on Android smartphone


# install mp3gain (if not installed)
if ! type "mp3gain" > /dev/null; then
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository --yes ppa:flexiondotorg/audio
sudo DEBIAN_FRONTEND=noninteractive apt update
sudo DEBIAN_FRONTEND=noninteractive apt install --yes --force-yes   aacgain mp3gain
  echo "mp3gain installed"

# install parallel (if not installed)
if ! type "parallel" > /dev/null; then
sudo DEBIAN_FRONTEND=noninteractive apt update
sudo DEBIAN_FRONTEND=noninteractive apt install --yes --force-yes   parallel
  echo "parallel installed"


echo -n "Enter Youtube playlist to convert to mp3: " 
read URL
PLAYLISTNAME=`$INSTALLDIR/$TOOL --flat-playlist --no-check-certificate  $URL | egrep -v "just" | egrep "Downloading playlist" | head -n1 | cut -d":" -f2`
PLAYLISTDIR=$(echo $PLAYLISTNAME | tr -d ' '| tr -d '&')

$INSTALLDIR/$TOOL --postprocessor-args "-threads 6" --no-check-certificate -v  --extract-audio --audio-format mp3 -i  $URL
# normalize volume (run 3 times in case mp3gain skips treatment of files during first 2 attempts)
find . -type f | parallel -X "xargs mp3gain -r -T"
find . -type f | parallel -X "xargs mp3gain -r -T"
find . -type f | parallel -X "xargs mp3gain -r -T"

echo "Temporarily disable all extensions in Google Chrome webbrowser and reboot your Android smartphone before attempting the .mp3 file transfer from Ubuntu to Android via AirDroid"
echo "The Mozilla Firefox web browser is not (yet) compatible with AirDroid. You have to use Google Chrome."
# enable new Quad9 ( DNS and DNSSEC service 
# in Ubuntu 17.10 64-bit using a bash shell script
sudo apt purge unbound
LogTime=$(date '+%Y-%m-%d_%Hh%Mm%Ss')
cp /etc/resolv.conf $HOME/resolv.conf_$LogTime
cp /etc/nsswitch.conf $HOME/nsswitch.conf_$LogTime
cp /etc/systemd/resolved.conf $HOME/resolved.conf_$LogTime

sudo service resolvconf stop
sudo update-rc.d resolvconf remove
cp /etc/resolv.conf /tmp/resolv.conf
grep -v nameserver /tmp/resolv.conf > /tmp/resolv.conf.1
echo 'nameserver' >> /tmp/resolv.conf.1
sudo cp /tmp/resolv.conf.1 /etc/resolv.conf
sudo service resolvconf start

# enable systemd caching DNS resolver
rm /tmp/nsswitch.conf
rm /tmp/nsswitch.conf.1
cp /etc/nsswitch.conf /tmp/nsswitch.conf
grep -v hosts /tmp/nsswitch.conf > /tmp/nsswitch.conf.1
# dns must be mentioned in next line, or else wget does not work
echo 'hosts: files mdns4_minimal [NOTFOUND=return] resolv dns myhostname mymachines' >> /tmp/nsswitch.conf.1
sudo cp /tmp/nsswitch.conf.1 /etc/nsswitch.conf

# set DNS server to
rm /tmp/resolved.conf
rm /tmp/resolved.conf.1
cp /etc/systemd/resolved.conf /tmp/resolved.conf
grep -v DNS /tmp/resolved.conf > /tmp/resolved.conf.1
# enable new Quad9 ( DNS and DNSSEC service
echo 'DNS=' >> /tmp/resolved.conf.1
echo 'DNSSEC=yes' >> /tmp/resolved.conf.1
sudo cp /tmp/resolved.conf.1 /etc/systemd/resolved.conf
sudo systemd-resolve --flush-caches
sudo systemctl restart systemd-resolved
sudo systemd-resolve --flush-caches
sudo systemd-resolve --status

# It is probably also necessary to manually set
# the DNS server to in the router's configuration
# and in the NetworkManager GUI

# test DNSSEC validation using dig command-line tool and using DNS server
# see:
dig +dnssec +multi
cd /tmp
rm *.deb
wget --no-check-certificate
wget --no-check-certificate `grep deb index.html |grep amd64|cut -d"\"" -f4`
sudo dpkg -i vivaldi*.deb
sudo apt-get install -f
# linapple (Apple IIe emulator)
sudo apt-get update
sudo apt-get install git unp build-essential checkinstall libopenal-dev 
sudo apt-get install freeglut3-dev gawk libsdl1.2-dev libcurl4-openssl-dev zlib1g-dev libzip-dev
sudo rm -rf apple2
sudo rm -rf linapple
git clone
mkdir ~/linapple/disks
cd ~/linapple/src
sudo make
cd ~/linapple
# Get ProDOS User Guide
wget --no-check-certificate
# Get Apple IIe ROM
wget --no-check-certificate
wget --no-check-certificate
wget --no-check-certificate
wget --no-check-certificate
# get newest ProDOS 2.4.1 operating system for Apple IIe (release date: September 2016!)
wget --no-check-certificate
# get Apple II games
wget --no-check-certificate
wget --no-check-certificate
wget --no-check-certificate
wget --no-check-certificate
unp *.zip
mv *.dsk ~/linapple/disks/
# Press F3 in linapple and navigate to ~/linapple/disks and select the game to load
# Then press CTRL-SHIFT-F2 to restart the linapple emulator and load the game
# how to compile and install newest version of 
# proftpd 
# in Ubuntu 16.04 LTS 64-bit:
sudo apt-get update
sudo apt-get install checkinstall build-essential
sudo apt-get build-dep proftpd-dfsg proftpd-basic 
sudo apt-get purge proftpd-basic
sudo rm -rf proftpd
git clone
cd proftpd
sudo ./configure
sudo make clean
sudo make
sudo checkinstall
# type 3 and hit  to enter 1.3.5b as the software version
apt-cache show proftpd
# Terminal output of 'apt-cache show proftpd' should be similar to this:
# Package: proftpd
# Status: install ok installed
# Priority: extra
# Section: checkinstall
# Installed-Size: 8492
# Maintainer: root
# Architecture: amd64
# Version: 1.3.5b-1
# Provides: proftpd
# Description: Package created with checkinstall 1.6.2
# Description-md5: 556b8d22567101c7733f37ce6557412e

Dear Mac OS X and GNU/Linux users,

It is highly recommended to update the bash shell program to protect against the Shellshock vulnerability.

Update on October 8, 2014: working patch for vulnerability CVE-2014-6277 for Ubuntu 14.04 LTS users is now available via a PPA repository (ppa:ubuntu-security-proposed/ppa).

More info here:

I presume this will also affect home routers running a modified version of GNU/Linux, if the router has bash installed…

Stock Android users are unaffected (for the time being), because the stock version of Android uses mksh instead of bash according to this link:

Non-jailbroken iPhones/iPads and non-rooted Android devices are not vulnerable to Shellshock.

However, jailbroken Android devices running Cydia or Cyanogen may have a vulnerable version of bash installed!

Ubuntu 14.04 LTS users:

Here is the code to run in a Terminal to see if your installed version of bash is vulnerable or not:

wget ; bash


Example of Terminal output:

$ sudo add-apt-repository ppa:ubuntu-security-proposed/ppa

$ sudo apt-get update

$ sudo apt-get dist-upgrade

Fetched 1,531 kB in 10s (152 kB/s)

The following packages will be upgraded:
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 576 kB of archives. After unpacking 0 B will be used.
Do you want to continue? [Y/n/?]
Get: 1 trusty/main bash amd64 4.3-7ubuntu1.5 [576 kB]
Fetched 576 kB in 0s (980 kB/s)
(Reading database … 331726 files and directories currently installed.)
Preparing to unpack …/bash_4.3-7ubuntu1.5_amd64.deb …
Unpacking bash (4.3-7ubuntu1.5) over (4.3-7ubuntu1.4) …
Processing triggers for man-db ( …
Processing triggers for menu (2.1.46ubuntu1) …
Processing triggers for install-info (5.2.0.dfsg.1-2) …
Setting up bash (4.3-7ubuntu1.5) …
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode
Processing triggers for menu (2.1.46ubuntu1) …

Current status: 0 updates [-1].
$ wget ; bash
–2014-10-08 09:30:50–
Resolving (…,, 2400:cb00:2048:1::a29f:f3ab, …
Connecting to (||:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 2533 (2.5K) [application/octet-stream]
Saving to: ‘’

100%[=================================================================================================================================================================>] 2,533 –.-K/s in 0s

2014-10-08 09:30:51 (177 MB/s) – ‘’ saved [2533/2533]

CVE-2014-6271 (original shellshock): not vulnerable
CVE-2014-6277 (segfault): not vulnerable
CVE-2014-6278 (Florian’s patch): not vulnerable
CVE-2014-7169 (taviso bug): not vulnerable
CVE-2014-7186 (redir_stack bug): not vulnerable
CVE-2014-7187 (nested loops off by one): not vulnerable
CVE-2014-//// (exploit 3 on not vulnerable