Skip to content

Instantly share code, notes, and snippets.

View nicholasadamou's full-sized avatar
🤓
Working hard to make the world better with software.

Nicholas Adamou nicholasadamou

🤓
Working hard to make the world better with software.
View GitHub Profile
@nicholasadamou
nicholasadamou / xfce4.sh
Created May 23, 2018 12:57
Install xfce4 on Kali Linux WSL to be used with an XRDP client on Windows.
#!/bin/bash
echo "[+] Installing XFCE4, this will take a while"
sudo apt update
sudo apt dist-upgrade -y --force-yes
sudo apt --yes --force-yes install kali-desktop-xfce xorg xrdp
echo "[+] Configuring XRDP to listen on port 3390 (but not starting the service)..."
echo "[+] To start the service run: sudo /etc/init.d/xrdp start"
sudo sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini
sudo echo "alias startx=\"sudo /etc/init.d/xrdp start\"" > ~/.bash_aliases
sudo echo "alias stopx=\"sudo /etc/init.d/xrdp stop\"" > ~/.bash_aliases
@nicholasadamou
nicholasadamou / install.sh
Created May 20, 2018 13:45
Installs Sublime Text 3 on a Linux-based system.
# see: https://askubuntu.com/a/954348/552275
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
# Stable Channel
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
# Dev Channel
# echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
@nicholasadamou
nicholasadamou / setup.sh
Created April 29, 2018 23:08
Start's the FruityWiFi daemon + web-interface.
#!/bin/bash
HTTP_PORT=8000
HTTPS_PORT=8443
ipaddr="$(hostname -I | cut -d ' ' -f1)"
/etc/init.d/fruitywifi restart && /etc/init.d/php7.0-fpm restart
sudo fuser -k "$HTTP_PORT"/tcp &>/dev/null
sudo fuser -k "$HTTPS_PORT"/tcp &>/dev/null
@nicholasadamou
nicholasadamou / config_wifi.sh
Created April 22, 2018 13:58
Configure the WiFi interface on Raspberry Pi 2/3.
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
exec sudo "$0" "$@"
fi
ssid="" # Enter SSID of WiFi
passwd="" # Enter Password of Given WiFi SSID
interface="wlan0"
wpa_conf="/etc/wpa_supplicant/wpa_supplicant.conf"
@nicholasadamou
nicholasadamou / wifi_rebooter.sh
Last active April 22, 2018 14:04
Restart the network-manager if no network connection is found on the Raspberry Pi 2/3.
#!/bin/bash
#see: http://alexba.in/blog/2015/01/14/automatically-reconnecting-wifi-on-a-raspberrypi/
# The IP for the server you wish to ping (8.8.8.8 is a public Google DNS server)
SERVER=8.8.8.8
#specify wlan interface
INTERFACE=wlan0
# Only send two pings, sending output to /dev/null
ping -I ${INTERFACE} -c2 ${SERVER} > /dev/null
@nicholasadamou
nicholasadamou / update.sh
Last active August 10, 2018 18:27
update re4son-kernel for Raspberry Pi 2/3
#!/bin/bash
# Installs/updates re4son-kernel for Raspberry Pi 2/3
# see: https://re4son-kernel.com/re4son-pi-kernel/
x="/usr/local/src"
rm -rf "${x:?}"/*
wget -O "$x"/re4son-kernel_current.tar.xz https://re4son-kernel.com/download/re4son-kernel-current/
tar -xJf "$x"/re4son-kernel_current.tar.xz -C "$x"
@nicholasadamou
nicholasadamou / setup_kali-pi.md
Created April 22, 2018 13:51
How to setup & configure re4son-Kali-Pi on Raspberry Pi 2/3

Setup Re4son-Kali-Pi on Raspberry Pi 2/3

  1. Download and image sticky-fingers-re4son-image to the Pi.
  2. Copy the following scripts: update apt_update apt_get_update aptitude_update to /usr/local/bin
  3. Copy the following scripts: start_tightvncserver.sh start_x11vncserver.sh to /root/data/
  4. copy the following the contents of : Backgrounds/ to ~/Backgrounds
  5. Set up WiFi connection to 'iPhone' using HDMI Screen
  6. remove tigervnc using: apt-get remove tigervnc-common tigervnc-standalone-server
  7. Setup re4son kernel:
@nicholasadamou
nicholasadamou / setup.sh
Created April 19, 2018 01:03
Reconfigure OpenSSH keys & to start on boot.
#!/bin/bash
# Uncomment a string within a given file
# $FILE is the targeted file
# $KEY is the string that is currently commented '#' (String must contain '#' or else 'sed' will return '1')
uncomment_str() {
FILE="$1"
KEY="$2"
sed -i "$FILE" -e "/$KEY/s/#//g"
@nicholasadamou
nicholasadamou / fix_internet.ps1
Created April 16, 2018 22:39
Fix Windows 10 Network Issue: "Connected but No Internet Access"
netsh int ip reset
@nicholasadamou
nicholasadamou / install.sh
Last active October 30, 2018 12:51
Install Virtual Box Guest Additions for Kali Linux
#!/bin/bash
# To install use the following snippet:
# curl -s <url-to-raw-gist> | bash
TARGET="/tmp/"
wget -q -O - archive.kali.org/archive-key.asc | apt-key add
apt update && apt upgrade -y && apt dist-upgrade -y && apt autoremove -y
if [ -f /media/cdrom/VBoxLinuxAdditions.run ]; then