This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmux list-panes -F "#{pane_tty}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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]%}➜ )" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
echo -e "\nInfo : find non commented lines in file" | |
echo -e "and put results in /tmp/uncommented-filename" | |
echo -e "Usage : ./find-non-commented.sh <file to search>\n" | |
else | |
echo -e "\nSearching $1 file for non commented lines" | |
FILENAME=$(basename -- "$1") | |
#grep -v "^\s*[#\;]\|^\s*$" $1 > /tmp/uncommented-$FILENAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run --rm -d --name tor_instance1 -p 127.0.1.1:9150:9150 nagev/tor | |
docker run --rm -d --name tor_instance2 -p 127.0.1.1:9151:9151 nagev/tor | |
docker run --rm -d --name tor_instance3 -p 127.0.1.1:9152:9152 nagev/tor | |
docker run --rm -d --name tor_instance4 -p 127.0.1.1:9153:9153 nagev/tor | |
cat << EOF > /etc/proxychains.conf | |
random_chain | |
proxy_dns | |
tcp_read_time_out 15000 | |
tcp_connect_time_out 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tmux new-session -s 'tmuxed-1' -n 'app1' -d | |
tmux split-window -t 0 -v | |
tmux resize-pane -t 1 -U -y 10 | |
tmux send -t 0 'ping -c 4 localhost' ENTER | |
tmux send -t 1 'hostname' ENTER | |
tmux at -t 'tmuxed-1' |