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 | |
echo "deb http://deb.debian.org/debian/ unstable main" | sudo tee --append /etc/apt/sources.list.d/unstable.list | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC | |
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' | sudo tee --append /etc/apt/preferences.d/limit-unstable | |
sudo apt update | |
sudo apt install wireguard -y |
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 | |
echo Peer IP Address? | |
read PEERIP | |
echo Peer Username? | |
read PEERUSER | |
echo Peer Password? | |
read -s PEERPASS |
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 | |
# Update | |
yum update -y | |
yum install epel-release -y | |
yum update -y | |
# Create jail directories | |
D=/nginx | |
mkdir -p $D | |
mkdir -p $D/etc |
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
# Done on raspberry pi 4 | |
## Linux pi4-master 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux | |
## OpenSSL 1.1.1d 10 Sep 2019 | |
# Generate Keys | |
ssh-keygen -t rsa -b 4096 -C "your_email@example.com" | |
ssh-keygen -p -m PEM -f ~/.ssh/id_rsa | |
ssh-keygen -f id_rsa.pub -e -m PKCS8 > id_rsa.pem.pub | |
# Create password string |
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
#cloud-config | |
# vim: syntax=yaml | |
# | |
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well | |
hostname: hostname | |
manage_etc_hosts: true | |
# You could modify this for your own user information | |
users: |
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
certbot certonly --register-unsafely-without-email --agree-tos --standalone -d full.dns.name |
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
# Set viewport cookie with js | |
<script type="text/javascript"> | |
document.cookie = 'viewport=' + screen.width; | |
</script> | |
# Nginx location | |
location / { | |
# Proxy only Iphone X | |
if ($cookie_viewport ~ "375") { | |
proxy_pass 127.0.0.1:8443; |
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 | |
until ping -I usb0 -c 1 192.168.0.1 >/dev/null 2>&1; do sleep 1; done | |
generate_pub_ip () | |
{ | |
current_ip=$(curl ifconfig.io) | |
first_octet=$(echo $current_ip | awk -F "." '{print $1}') | |
second_octet=$(echo $current_ip | awk -F "." '{print $2}') | |
third_octet=$(echo $current_ip | awk -F "." '{print $3}') | |
fourth_octet=$(echo $current_ip | awk -F "." '{print $4}') |
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 | |
APPROVED_SOURCES=(+18008675309) | |
SOURCE=$(curl -X $'GET' -H $'Host: 192.168.0.1' -H $'Referer: http://192.168.0.1/index.html' -H $'Connection: close' $'http://192.168.0.1/goform/goform_get_cmd_process?isTest=false&cmd=sms_data_total&page=0&data_per_page=500&mem_store=1&tags=10&order_by=order+by+id+desc&_=1620342672308' | jq -r .messages[0].number) | |
COMMAND=$(curl -X $'GET' -H $'Host: 192.168.0.1' -H $'Referer: http://192.168.0.1/index.html' -H $'Connection: close' $'http://192.168.0.1/goform/goform_get_cmd_process?isTest=false&cmd=sms_data_total&page=0&data_per_page=500&mem_store=1&tags=10&order_by=order+by+id+desc&_=1620342672308' | jq -r .messages[0].content | awk -F "" '{print $4}') | |
#SOURCE CHECK | |
if [[ "${APPROVED_SOURCES[@]}" =~ "${SOURCE}" ]]; then | |
if [[ "${COMMAND}" =~ "1" ]]; then | |
systemctl start wg-quick@wg0 |
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
# Resource https://www.bitarray.io/dictionaries-in-bash/ | |
declare -A associative | |
# Special characters | |
associative[0021]="!" | |
associative[0000]="@" | |
associative[0023]="#" | |
associative[0002]="$" | |
associative[0025]="%" |
OlderNewer