Posts Tagged ‘bash’

# enable new Quad9 (9.9.9.9) 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 9.9.9.9' >> /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 9.9.9.9
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 (9.9.9.9) DNS and DNSSEC service
# https://arstechnica.com/information-technology/2017/11/new-quad9-dns-service-blocks-malicious-domains-for-everyone/
echo 'DNS=9.9.9.9' >> /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 9.9.9.9 in the router's configuration
# and in the NetworkManager GUI

# test DNSSEC validation using dig command-line tool and using DNS server 9.9.9.9:
# see: https://docs.menandmice.com/display/MM/How+to+test+DNSSEC+validation
dig pir.org +dnssec +multi
Advertisements
cd /tmp
rm *.deb
wget --no-check-certificate https://vivaldi.com/download/
wget --no-check-certificate `grep deb index.html |grep amd64|cut -d"\"" -f4`
sudo dpkg -i vivaldi*.deb
sudo apt-get install -f
cd
sudo apt update
sudo apt install cmake build-essential
sudo apt install checkinstall git
sudo apt remove hashcat
sudo apt build-dep hashcat
sudo rm -rf hashcat/
git clone https://github.com/hashcat/hashcat.git
cd hashcat
git submodule update --init
sudo make
sudo checkinstall
hashcat --version
# hashcat version should be v3.5.0 or newer
# install all dependencies for gifine:
cd
sudo apt update
sudo apt install ffmpeg graphicsmagick gifsicle luarocks
sudo apt install cmake libgirepository1.0-dev build-essential git
sudo apt install libxext-dev checkinstall libimlib2-dev
sudo apt install libimlib2 mesa-common-dev libxrender-dev
sudo apt install libxrandr-dev libglew-dev libglm-dev libglu1-mesa-dev
sudo apt build-dep graphicsmagick
git clone https://github.com/naelstrof/slop.git
cd slop
cmake -DCMAKE_OPENGL_SUPPORT=true ./
sudo make
sudo make install
# install gifine:
sudo luarocks install --server=http://luarocks.org/dev gifine
# test with this command: gifine

 

#!/bin/bash
# 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
cd
sudo rm -rf apple2
sudo rm -rf linapple
git clone https://github.com/LasDesu/linapple.git
mkdir ~/linapple/disks
cd ~/linapple/src
sudo make
cd ~/linapple
# Get ProDOS User Guide
wget --no-check-certificate  http://www.applelogic.org/files/PRODOSUM.pdf
# Get Apple IIe ROM
wget --no-check-certificate  ftp://ftp.apple.asimov.net/pub/apple_II/emulators/rom_images/apple_iie_rom.zip
wget --no-check-certificate  ftp://ftp.apple.asimov.net/pub/apple_II/emulators/rom_images/077-0018%20Apple%20IIe%20Diagnostic%20Card%20-%20English%20-%20Lower%20ROM%202764.bin
wget --no-check-certificate  ftp://ftp.apple.asimov.net/pub/apple_II/emulators/rom_images/077-0019%20Apple%20IIe%20Diagnostic%20Card%20-%20English%20-%20Upper%20ROM%202764.bin
wget --no-check-certificate  ftp://ftp.apple.asimov.net/pub/apple_II/emulators/rom_images/2764_APPLE-IIe-0341-0162-A_PAL_SWE_FIN.bin
# get newest ProDOS 2.4.1 operating system for Apple IIe (release date: September 2016!)
wget --no-check-certificate https://archive.org/download/ProDOS_2_4_1/ProDOS_2_4_1.dsk
# get Apple II games
wget --no-check-certificate  http://www.virtualapple.org/apple2/Breakout_Chipout_Hi-Res_Breakout.zip
wget --no-check-certificate  http://www.virtualapple.org/apple2/Galaxian.zip
wget --no-check-certificate  http://www.virtualapple.org/apple2/SantaParaviaandFiumaccio.zip
wget --no-check-certificate  http://www.virtualapple.org/apple2/Karateka.zip
unp *.zip
mv *.dsk ~/linapple/disks/
~/linapple/linapple
# 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
cd
sudo rm -rf proftpd
git clone https://github.com/proftpd/proftpd
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
# How to fix SSL "certificate verify failed" error making it impossible to pull data from 'https://rubygems.org/ in Ubuntu 16.04 LTS 64-bit# 
# This bash script will make it possible to use the "sudo gem install <package>" command
# For example: sudo gem install tenancy   will work after running this script
sudo apt-get update
sudo apt-get install ruby
sudo update-ca-certificates
sudo gem sources -r https://rubygems.org/
sudo gem sources -a http://rubygems.org/
sudo gem update --system
sudo gem sources -r http://rubygems.org/
sudo gem sources -a https://rubygems.org/
sudo gem install tenancy