This file contains hidden or 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
| #!/usr/bin/env bash | |
| # set -ex | |
| clear | |
| if curl -s -m 5 -o /dev/null -w "%{http_code}" www.google.com | grep -q "200"; then | |
| ghproxy="https:/" | |
| ghtype=false | |
| else |
This file contains hidden or 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
| #!/usr/bin/env sh | |
| filename="$(uname -n)" | |
| Echo_c() { | |
| echo -e "\033[1;33m$1\033[0m" | |
| } | |
| writefile() { | |
| echo -e "$@" >>"$filename".md |
This file contains hidden or 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/env bash | |
| set -ex | |
| Docker_backup(){ | |
| backup_data=$1-$(date +%Y-%m-%d-%H:%M:%S) | |
| echo -e "\n###### Docker Stop $1 ######\n" >> $Logs_path/$backup_data.log | |
| docker stop $1 >> $Logs_path/$backup_data.log | |
| backup_num=$(ls -l $Backup_path/$1* | wc -l) | |
| echo -e "\n###### $1 Backup ######\n" >> $Logs_path/$backup_data.log | |
| zip -r $Backup_path/$backup_data.zip /docker/$2/ >> $Logs_path/$backup_data.log |
This file contains hidden or 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
| #!/usr/bin/env sh | |
| clear | |
| echo "#########################\n\nWorking on the WIZ tunnel\n" | |
| if [ "$(ps -e | grep "0.0.0.0:9999" | grep -v "grep" | cut -d " " -f 1)" == "" ]; then | |
| ssh -C -T -N -L 0.0.0.0:9999:10.0.4.6:80 wiz@bit & | |
| else | |
| kill $(ps -e | grep "0.0.0.0:9999" | grep -v "grep" | cut -d " " -f 1) | |
| ssh -C -T -N -L 0.0.0.0:9999:10.0.4.6:80 wiz@bit & |
This file contains hidden or 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
| #!/usr/bin/env sh | |
| ##### INIT ##### | |
| set -ex | |
| active_response_path=$( | |
| cd "$(dirname "$0")" | |
| pwd | |
| ) | |
| read line |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| import sys, shutil, os | |
| SYSTEMDISK = "MacintoshHD-DATA" | |
| NEWPATH = sys.argv[1] | |
| OLDPATH = "/Volumes/" + SYSTEMDISK + NEWPATH | |
| def getinfo(): | |
| print("@1: PWD: " + os.path.dirname(NEWPATH)) |
This file contains hidden or 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
| [Unit] | |
| Description=iptables fwknopd ssh | |
| After=fwknop-server.service | |
| [Service] | |
| Type=oneshot | |
| RemainAfterExit=yes | |
| ExecStart=/docker/init/iptable_fwknopd.sh | |
| PrivateTmp=True |
This file contains hidden or 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
| #!/usr/bin/env sh | |
| set -ex | |
| WHITELIST_FILE="$( | |
| cd "$(dirname "$0")" || exit | |
| pwd | |
| )/.whitelist.txt" | |
| read line | |
| WHITELIST_COMMAND="$(echo "$line" | sed -e 's/":/\n/g' | grep alert | cut -d '"' -f 2)" | |
| WHITELIST_ARGUMENT="$(echo "$line" | sed -e 's/":/\n/g' | grep alert | cut -d '"' -f 4)" |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| set -ex | |
| # clean history | |
| history -c | |
| rm -f ~/.bash_history ~/.zsh_history ~/.sh_history ~/.ash_history | |
| # clean login history | |
| rm -f /var/run/utmp /var/log/wtmp /var/log/lastlog /var/log/btmp /var/log/auth.log /var/log/secure /var/log/maillog /var/log/message /var/log/cron /var/log/spooler /var/log/boot.log |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # -*- coding: UTF-8 -*- | |
| import json | |
| import os | |
| import socket | |
| def server_init(): | |
| HOST, PORT = '0.0.0.0', 9999 |