Skip to content

Instantly share code, notes, and snippets.

Avatar

Vpnwall Services vpnwall-services

View GitHub Profile
@vpnwall-services
vpnwall-services / find-multi-args.sh
Created Apr 20, 2018
[Find with multi arguments] Search with two or more arguments #linux #search
View find-multi-args.sh
find . -regextype posix-egrep -regex ".*\.(html|scan)"
@vpnwall-services
vpnwall-services / kali-repository
Last active Apr 20, 2018
[Kali-Repo] Adds Kali Repository on Linux #linux #repo
View kali-repository
#!/bin/bash
apt-get update ; apt-get install -y dirmngr
grep -q -F 'deb http://http.kali.org/kali kali-rolling main contrib non-free' /etc/apt/sources.list || echo 'deb http://http.kali.org/kali kali-rolling main contrib non-free' >> /etc/apt/sources.list
apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6
apt-get update
apt-get install -y -t kali-rolling
@vpnwall-services
vpnwall-services / show-tmux-tty-names.sh
Created Apr 23, 2018
[Get TTY name of Tmux pane] Print the TTY to output directly to Tmux pane #linux # tmux #info
View show-tmux-tty-names.sh
tmux list-panes -F "#{pane_tty}"
@vpnwall-services
vpnwall-services / saltautocompletion.sh
Last active Apr 23, 2018
[Salt Autocompletion] Enable auto completion for saltstack commandline #linux #saltstack #configuration
View saltautocompletion.sh
#!/bin/bash
wget https://raw.githubusercontent.com/saltstack/salt/develop/pkg/salt.bash
cp salt.bash /etc/bash_completion.d/
source /etc/bash_completion.d/salt.bash
@vpnwall-services
vpnwall-services / clean-old-kernels.sh
Last active Apr 23, 2018
[Clean old kernels] Script to deleted unused kernels and free disk space
View clean-old-kernels.sh
#!/bin/bash
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get purge -y
@vpnwall-services
vpnwall-services / zsh-auto-install.sh
Last active Apr 23, 2018
[Zsh Auto Installer] Zsh automated installer #linux #zsh #installer
View zsh-auto-install.sh
#!/bin/bash
apt-get update ; apt-get upgrade -y
apt-get install tmux zsh htop git -y
wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh
chmod +x install.sh
sed -i 's/env zsh//g'
./install.sh
cat << EOF > /root/.oh-my-zsh/themes/robbyrussell.zsh-theme
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
@vpnwall-services
vpnwall-services / fwif.sh
Last active Apr 23, 2018
[Find word in files] Search for a specific word in a set of folders and files #linux #search #grep
View fwif.sh
#!/bin/bash
if [ -z "$1" ]
then
echo -e "\nInfo : find word in files from specified folder"
echo -e "\nUsage : cd into target folder and then"
echo -e "\n ==> : ./find-word-in-files.sh <word to search>"
else
echo -e "\n Searching $1 in $PWD"
# grep -R {"$1"} {"$PWD"}
grep -rnw $PWD -e "$1"
@vpnwall-services
vpnwall-services / block-non-tor-traffic.sh
Last active May 8, 2018
[Block non-Tor traffic] Block all traffic except on port 9050 to avoid leaks #linux #iptables #tor #security #leak
View block-non-tor-traffic.sh
#!/bin/bash
touch /tmp/reset.iptables
iptables-restore < reset.iptables
#Reset OUTPUT table
iptables -F OUTPUT
#Enable related traffic to go through
iptables -A INPUT -m state --state ESTABLISHED, RELATED -j ACCEPT
#Enable traffic related to debian-tor user
iptables -A OUTPUT -j ACCEPT -m owner --uid-owner debian-tor
#Enable traffic from loopback
@vpnwall-services
vpnwall-services / docker-auto-installer.sh
Last active May 8, 2018
[Docker Auto Installer] Docker automated installer #linux #docker #installer
View docker-auto-installer.sh
#!/bin/bash
apt-get update
apt-get install -y \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
@vpnwall-services
vpnwall-services / rotor.sh
Last active May 8, 2018
[Rotor] Multi-instance Tor configurator #linux #pentest #tor #hack
View rotor.sh
#!/bin/bash
#apt-get install tor lsof tmux -y --force-yes
NAME="Rotor Daemon"
killall tor
mv /etc/tor/torrc /etc/tor/torrc.bak
mv /etc/proxychains.conf /etc/proxychains.conf.bak
tmux kill-session -t "$NAME"
tmux new-session -s "$NAME" -n "Tor daemons" -d
cat << EOF > /etc/proxychains.conf
You can’t perform that action at this time.